You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org
Network cheat sheet: Difference between revisions
imported>Ema |
imported>Ema (Removing foundry section as we don't have any foundry equipment any longer) |
||
Line 73: | Line 73: | ||
* top - takes you to the top level of config mode | * top - takes you to the top level of config mode | ||
* show - shows you configuration below that level | * show - shows you configuration below that level | ||
[[Category:Network]] | [[Category:Network]] |
Revision as of 10:13, 23 January 2017
SSH access to network equipment
WMF routers and switches follow the Infrastructure_naming_conventions.
For example, the hostnames of eqiad core routers are cr1-eqiad.wikimedia.org and cr2-eqiad.wikimedia.org:
ssh cr1-eqiad.wikimedia.org
Access switches are named asw-${rownum}-${dc}.mgmt.${dc}.wmnet. Hence, row b switches in eqiad and codfw can be accessed as follows:
ssh asw-b-eqiad.mgmt.eqiad.wmnet ssh asw-b-codfw.mgmt.codfw.wmnet
Matching hosts with rack numbers
To find out which cache hosts are connected on codfw's row c:
ema@asw-c-codfw> show interfaces descriptions | match cp xe-2/0/3 up up cp2013 xe-2/0/4 up up cp2014 xe-2/0/5 up up cp2015 xe-7/0/3 up up cp2016 xe-7/0/4 up up cp2017 xe-7/0/5 up up cp2018
Interfaces names, reported in the first column, follow Juniper's interfaces naming convention. The first part of the interface name, xe in the examples above, is the media type. xe stands for 10 Gigabit Ethernet interface, other options would have been ge for Gigabit Ethernet and et for 40 Gigabit Ethernet. The second part is the FPC, which allows us to find out the specific rack number to with the host is connected. The first three hosts (cp2013, cp2014 and cp2015) are on c2 (xe-2), while cp2016, cp2017 and cp2018 are on c7 (xe-7). The last number represents the port number.
Racktables also allows to check the mapping between racks and hostnames.
Juniper
Junipers take ssh keys. huzzah!
Juniper has operational mode and configuration mode.
operational mode - {master:8} lcarr@asw-a-eqiad> configuration mode - {master:8}[edit] lcarr@asw-a-eqiad#
Operational commands
show ethernet-switching table - shows mac addresses show ethernet-switching table interface - shows mac addresses for that interface show ethernet-switching table vlan - shows mac addresses for vlan show interfaces descriptions - Interface Admin Link Description ge-1/0/0 up up ms1001 show interfaces terse - shows interfaces with ip's in a very short format show interface ge-1/0/0 (extensive)- shows interfaces in more detail monitor interface xe-1/1/0 - shows interface in a real-time updating mode (errors, bits, etc) show log messages | last 20 - shows log with info
Config commands
Junipers configure after you confirm - you can configure and then double check
- configure - puts you in config mode
- exit - takes you up one level (or out of) config mode
- top - takes you to the top level of config mode
- show - shows you configuration below that level