Sunteți pe pagina 1din 14

Brocade Education Services Network Command Reference

System Essentials Command Reference


User Level: Switch-FESX> enable
Privileged Level: Switch-FESX# configure terminal
Configuration level: Switch-FESX(config)#
Switch Command Prompt: Switch-FESX#
Router Command Prompt: FESX#
Setting IP Address on a Switch
Switch-FESX(config)#ip address 10.100.10.2/24
Setting Default Gateway on a Switch
Switch-FESX(config)#ip default-gateway 10.100.10.1
Configuring hostname
Switch-FESX(config)#hostname LYR2
Switch-LYR2(config)#
Viewing Running Configuration (Active in RAM)
Switch-LYR2(config)#show run
Viewing Startup Configuration (Stored in Flash)
Switch-LYR2(config)#show configuration
Viewing Contents of Flash
Switch-LYR2(config)#show flash
Saving Running Configuration to Flash
Switch-LYR2(config)#write memory
Immediately boot hardware on Secondary Flash
Switch-LYR2#boot system flash secondary (b s f s)
Configure to boot on Secondary Flash when reloaded (router)
LYR2(config)#boot system flash secondary
LYR2(config)#write memory
Configuring Password Access
Enable: Switch-LYR2(config)#enable super-user-password
Foundry
Telnet: Switch-LYR2(config)#enable telnet password TelnetPSWD
Local Username/Password lists
Switch-LYR2(config)#username BigCat priv 0 password BCpswd
(must use w/AAA)
Configuring Authentication Authorization & Accounting Telnet
access checked against local usernames & Passwords
Switch-LYR2(config)#aaa authentication login default local

Revision 0310 1
Brocade Education Services Network Command Reference

System Essentials Command Reference (continued)

Recovering From Lost Password (enter “B” within 2 seconds of boot


start)
BOOT MONITOR>no password (cannot be abbreviated)
BOOT MONITOR>boot system flash primary
Switch-LYR2>enable (Be sure to reset the password)
Porting debug output to Telnet Client: By default, no debug output
will be received at a telnet client. To send the debug report to a
telnet client, do the following:
telnet@LYR3#show who
Console connections:
established, monitor enabled
3 minutes 49 seconds in idle
Telnet connections (inbound):
1 established, client ip address 10.10.10.10
you are connecting to this session
5 seconds in idle
2 closed
3 closed
4 closed
5 closed
Telnet connection (outbound):
6 established, client ip address 10.10.20.10
telnet@LYR3#debug destination telnet 1
KILL Command
Terminates specified active CLI session and resets the CONFIG token. If
terminated session was a console, the console is sent back into User
EXEC mode. If the terminated CLI was a Telnet session, connection is
closed.
EXAMPLE:
telnet@LYR3#kill telnet 6
If communication with destination was disrupted, telnet session would
hang and a second telnet session would be required to kill the session.

Revision 0310 2
Brocade Education Services Network Command Reference

VLAN Command Reference

Configuring a Trunk
Switch-to-Switch: Switch-LYR2(config)#trunk switch e17 to 18
Switch-to-Server: Switch-LYR2(config)#trunk server e1 to 2
Enable the trunk: Switch-LYR2(config)#trunk deploy
Trunk Statistics: Switch-LYR2(config)#show trunk
(link status should be ACTIVE)

Configuring a VLAN
(VLAN ID 2 with untagged ports ethernet 4, 7 and 13)
Switch-LYR2(config)#vlan 2
Switch-LYR2(config-vlan-2)#untagged e4 e7 e13
Untagged interfaces can be members of only one VLAN and are generally
attached to end stations.

(VLAN ID 2 with a tagged trunk)


Switch-LYR2(config-vlan-2)#tagged e1
Interface e1 can be a tagged member of other vlans for multiple vlan
traffic on one link. Tagged interfaces are generally connections to
another switch or router.

Verifying VLAN Configuration

Switch-LYR2(config-vlan-2)#show vlan

Revision 0310 3
Brocade Education Services Network Command Reference

VLANS on Routers - Command Reference

Configuring VLANs on Routers


LYR3(config)#vlan 22
LYR3(config-vlan-22)#untag ethernet 1/1 to 1/12
LYR3(config-vlan-22)#router-interface ve 1
LYR3(config-vlan-22)#exit
LYR3(config)#interface ve1
LYR3(config-vif-1)#ip address 192.168.22.1/24

Using Ping Command on a Switch


SW-LYR2#ping 192.168.10.10
(this generates one ping)
SW-LYR2#ping 192.168.10.10 count 100
The source address in the ping packet will be switches management
address.

Using Ping Command on a Router


LYR3#ping 192.168.22.10
The default source address in the ping packet will be the address of
the directly connected interface to that subnet. For example, the
virtual interface configured above: 192.168.22.1/24

Troubleshooting Tip: You can check to see if a PC’s gateway is properly


configured by pinging its address from a source address that is not on
that PCs subnet.
LYR3#ping 192.168.22.10 source 192.123.42.1
The address 192.168.42.1 is on another active interface of the LYR3
router.
This technique is also effective for checking the route table on
another router several hops away from the pinging router.

Revision 0310 4
Brocade Education Services Network Command Reference

Spanning Tree 802.1d Command Reference

Enabling Spanning Tree


At global level: LYR3(config)#spanning-tree
At VLAN level: LYR3(config-vlan-3)#spanning-tree
At interface level: LYR3(config)#interface e4
LYR3(config-if-4)#spanning-tree
On Routers Spanning Tree is OFF by default even with VLANs configured.
On Switches Spanning Tree is ON by default.
Changing Spanning tree Parameters
Listening & Learning times: SW-LYR2(config-vlan-3)#span forward-delay
Root-bridge hello interval: SW-LYR2(config-vlan-3)#span hello-time
Non-Root bridge dead interval: SW-LYR2(config-vlan-3)#span max-age
Root Bridge Election: SW-LYR2(config-vlan-1)#span
priority
Sending Bridge Port Priority
(config-vlan-1)#spanning-tree ethernet<port#> priority <1-255>
Note: Port priority only effects the choice of a port blocking for
redundant links between two directly connected switches.
Spanning Tree Device Titles
Root Bridge: the switch that acts as center of a layer 2 tree topology.
Ideally it is the bridge that has the lowest cost path to all other
bridges in that particular VLAN.
Designated Port: The only port on a segment that traffic forwards
ingress traffic to the Root Bridge.
Root Port: The port on a non root bridge that is selected as having the
lowest path cost to the Root.
Bridge ID: [Bridge Priority | Lowest Port MAC address]

Revision 0310 5
Brocade Education Services Network Command Reference

Spanning Tree 802.1d Command Reference (continued)

Spanning Tree Show Commands


Show only enabled ports SW-LYR2#show span | exclude
DISABLED
Show detailed info / enabled ports SW-LYR2#show span detail | exclude
DISABLED
Only show information on VLAN 3 SW-LYR2(config-vlan-3)#show span
Various Costs in show span report:
Root Cost: Cumulative cost from this bridge to the root bridge. If this
device is the root bridge, root cost is 0.
Design Cost: The cost to the root bridge as advertised by the
designated bridge connected to this port. If the designated bridge is
the root bridge itself the cost is 0. The ID of the designated bridge
is shown in the Design Bridge field.
Spanning tree port states – 802.1d
Disabled: The Device port is administratively shut.
Listening: The Device Title Election takes place (15 sec.)
Learning: The Device is learning the MAC addresses for all hosts and
building a forwarding table that maps each address to an
interface. (15 sec.)
Forwarding: The device uses the forwarding table to map a packets
destination
MAC address to a specific interface, and then forwards the
packet out that interface

Blocking: Data traffic is blocked for a Non-Designated Port while BPDUs


are allowed to circulate.

Viewing CPU Loading


On Router: LYR3(config)#show process cpu
On Switch: SW-LYR2#show cpu

Revision 0310 6
Brocade Education Services Network Command Reference

Spanning Tree 802.1w (Rapid Spanning Tree) Command Reference

Enabling 802.1w Rapid Spanning Tree


At the global level: None: 802.1w only enabled for vlans!
At the VLAN level: SW-LYR2(config-vlan-3)#spanning-tree 802-1w
At the interface level: (config)#interface e4
(config-if-4)#spanning-tree [802-1w][rstp]
“rstp” is for MLX/XMR “802-1w” can be abbreviated with “8”.
Switches & Routers Spanning Tree 802-1w is OFF by default even with
Vlans configured.
Enabling 802.1w within a Vlan Disables 802.1d in that Vlan without
effecting STP in other Vlans.
Changing Spanning tree 802.1w Parameters
Bridge Priority
SW-LYR2(config-vlan-2)#spanning-tree [802-1w][rstp] priority 1
Sender-Bridge Port Priority
SW-LYR2(config-vlan-2)#spanning-tree [802-1w][rstp] ethernet 1/3 port
priority 8
Note: Port priority only effects choice of a port blocking for
redundant links between two directly connected switches.
Root Bridge acts as the center of a layer 2 tree topology. Bridge has
the lowest cost path to all other bridges in that VLAN. (Lowest Bridge
ID)
Spanning Tree 802.1w Show Commands
Show only enabled ports SW-LYR2#sh show [8][rstp] | exclude
DISABLED
Show detail on enabled ports SW-LYR2#sh [8][rstp] detail | exclude
DISABLED
Show information VLAN 3 only SW-LYR2(config-vlan-3)#show [802-
1w][rstp]

Revision 0310 7
Brocade Education Services Network Command Reference

Spanning Tree 802.1w (Rapid Spanning Tree) Command Reference (continued)

Port Roles
Designated Port: Only port that forwards traffic to the Root Bridge.
Root Port: Port on a non root bridge with lowest path cost to the Root
Bridge.
Alternate Port: If non-root bridge already has Root port, port that
receives RST BPDU superior to those it can transmit becomes Alternate
port
Backup Port: If two ports on same bridge are physically connected,
port that receives superior RST BPDU becomes the Backup port; other
port becomes Designated port.
Bridge ID: [Bridge Priority | Lowest Port MAC address]
Spanning tree port states
Forwarding: Device uses forwarding table to map packet destination MAC
address to specific interface, forwards packet out interface.
Discarding: 802.1W blocks data traffic on port; prevent loop.
Defining 802.1w Port Types
Administrative Point-to-Point MAC
SW-LYR2(config-vlan-2)#spanning-tree [8][rstp] e1/2 Admin-pt2pt-mac
Administrative Edge Port
SW-LYR2(config-vlan-2)#spanning-tree [8][rstp] e1/4 admin-edge-port

Revision 0310 8
Brocade Education Services Network Command Reference

Routing Command Reference

Addressing a router interface


LYR3(config)#int e3
LYR3(config-if-3)#ip address 10.31.4.3 255.255.255.0
Or with CIDR notation:
Router(config-if-3)#ip address 10.31.4.3/24
Configuring CIDR into CLI show commands
LYR3(config)#ip show-subnet-length
LYR3(config)#write memory
Configuring a Static Route
LYR3(config)#ip route 10.10.10.0/24 172.16.1.13 (or intf.)
Configuring a Default Route
LYR3(config)#ip route 0.0.0.0/0 172.16.1.14 (or intf.)
Showing the IP Route Table
LYR3(config)#show ip route
Total number of IP routes: 3
Start index: 1 D:Connected R:RIP S:Static O:OSPF *:Candidate default
Destination Gateway Port Cost Type
1 172.16.4.2/30 Direct 2 1 D
2 172.16.1.0/24 Direct 1 1 D
3 172.16.3.0/24 0.0.0.0 3 110/2 0
3 0.0.0.0/0 172.16.1.14 2 2 S
Note: Only subnets with interfaces that are addressed and enabled will
show in the IP route table.
Disabling Layer 2 Switching with route-only (default on XMR/MLX)
To disable Layer 2 switching globally on a router:
LYR3(config)# route-only
To disable it specific interface, go to the Interface configuration
level for that interface then disable the feature.
LYR3(config)#interface ethernet 3/2
LYR3(config-if-3/2)#route-only
This command is necessary if switch/routers are configured in a looped
topology: a broadcast storm can result. Do NOT use route-only at the
global config level on a router configured with Vlans as this also
disables switching between two ports in the same Vlan.

Revision 0310 9
Brocade Education Services Network Command Reference

OSPF Command Reference

Enabling OSPF on a Router Interface


LYR3(config)#router ospf
LYR3(config-ospf-router)#area 0
LYR3(config-ospf-router)#int e1
LYR3(config-if-2)#ip ospf area 0
Configure attached router - check neighbor relationship show ip ospf
neighbor
Advertising a Default Route into the OSPF Database
LYR3(Config-ospf-router)#default-information-originate
Advertising a Directly Connected Subnet into the OSPF Database
LYR3(config-ospf-router)#redistribution connected
Finding Router ID
LYR3#show ip
Configuring a Virtual Link
LYR3(config-ospf-router)#area 2 virtual-link 161.69.6.1
Where 161.69.6.1 is the router ID at the other end of the virtual link
Configuring Inter-Area Summarization (on ABR)
LYR3#(config-ospf-router)#area 2 range 192.168.40.128/26
Configuring External Route Summarization (on ASBR)
LYR2(config-ospf-router#)summary-address 192.168.60.64/26

Revision 0310 10
Brocade Education Services Network Command Reference

OSPF Command Reference (continued)

OSPF SHOW COMMANDS


show ip ospf neighbor Used when troubleshooting OSPF neighbor
problems. Shows current neighbor state; must be FULL to work.
show ip ospf interface Displays area ID and adjacency
information per interface. Gives more detail than show ip ospf
neighbor.
show ip ospf route Displays only ospf routes; is especially important
if doing redistribution of other routing protocols like BGP.
show ip ospf database Displays link state database; used for
troubleshooting corrupted databases; possible problem with large OSPF
implementations.
show ip ospf area Displays type of area (Normal, Stub, NSSA). Used
when troubleshooting neighbor problems when converting stub area to
normal or vice versa. All routers in the same area must be configured
for the same area and type.
show ip ospf virtual-link Virtual-link output must say “ptr 2 ptr” to
be running.
show ip ospf trap Displays the state of OSPF traps triggered by SNMP.
show ip ospf border-routers Shows routers that are ABRs or ASBRs.
show ip ospf config Displays only the OSPF part of startup-config.

Revision 0310 11
Brocade Education Services Network Command Reference

RIP and Redistribution of Routing Protocols

Enabling RIP
LYR3(config)#router rip
LYR3(config-rip-router)#interface e1
LYR3(config-if-1)#ip address 207.95.8.1/24
LYR3(config-if-1)#ip rip v2-only
LYR3(config-ospf-router)#redistribution rip
LYR3(config-ospf-router)#router rip
LYR3(config-rip-router)#redistribution

OtherLYR3 is RIP router attached to LYR3 and needs to learn default


routes redistributed from LYR3. Example:
OtherLYR3(config)#int e 2/2
OtherLYR3(config-if-2/2)#ip rip learn-default

Revision 0310 12
Brocade Education Services Network Command Reference

BGP Command Reference

Configuring EBGP peering


LYR3(config)#router bgp
configure 'local-as' parameter in order to enable BGP.
LYR3(config-bgp-router)#local-as 100
LYR3(config-bgp-router)#neighbor 10.69.5.2 remote-as 200

The remote peer address is the interface address of the directly


connected port. Routers MUST have a PCP connection to peer. The same
configuration steps are performed on the peering router identifying
the address on the peer’s directly attached interface.

Verify that the EBGP peering is ESTABLISHED


LYR3(config-bgp-router)#show ip bgp neighbor

Configuring IBGP Peering


Configure IBGP router to peer to its neighbor from a loopback
address rather than a physical interface:

LYR3(config)#router bgp
LYR3(config-bgp-router)# local-as 100
LYR3(config-bgp-router)#neighbor 10.69.7.1 remote-as 100
LYR3(config-bgp-router)#neighbor 10.69.7.1 update-source loopback 1

Restart IBGP peering operation, initially peering from physical


interface in step 2.
LYR3(config-bgp-router)#clear ip bgp neighbor 10.69.7.1
Perform steps 2-4 on the IBGP peering router.
Verify that the IBGP peering is ESTABLISHED
LYR3(config-bgp-router)#show ip bgp neighbor

Revision 0310 13
Brocade Education Services Network Command Reference

BGP Command Reference (continued)

Injecting Routes into the Internet Routing Table


LYR3(config-bgp-router)#network 10.1.1.0 /24

Viewing the Internet Routing table (EGP table)


LYR3#show ip bgp
Total number of BGP Routes: 2
Status codes: s suppressed, d damped, h history, * valid, > best,
i internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.0/24 10.1.1.2 0 100 0 200 i
*> 10.1.3.0/24 10.1.1.2 0 100 0 200 i
Status codes:
A list of the characters the display uses to indicate the route’s status. The
status code appears in the left column of the display, to the left of each
route. The status codes are described in the command’s output.
Status Code Meaning
S - The entry is suppressed
* - The entry is valid
> - If the prefix has multiple entries, this indicates the best route
i - If the prefix was learned via IBGP, then an “i” is located to
the left of the entry
Origin Codes
A character the display uses to indicate the route’s origin. The origin code
appears to the right of the AS path (Path field). The origin codes are
described in the command’s output.
Origin Code Meaning
i - The routes have been installed using the “network” command
e - The routes have been learned via EBGP
? - The routes have been learned via redistribution
Network: The network address and prefix.
Next Hop: The Next Hop attribute advertised by a BGP neighbor. This may not
be the Next Hop IGP router, for example if AS 200 was composed of 3 routers
in series and the center router is a non BGP, Next Hop means next BGP peer.
Path: The route’s AS path. The autonomous systems in this path are only
those external to the AS for which this command was executed.

Revision 0310 14

S-ar putea să vă placă și