2014年12月9日 星期二

第三層之備援-FHRP(HSRP,VRRP,GLBP)

熱備援路由協定HSRP
S1(config)#interface vlan 50
S1(config-if)#ip address 192.168.1.10 255.255.255.0
S1(config-if)#standby 1 priority 200
S1(config-if)#standby 1 ip 192.168.1.1
S1(config-if)#standby 1 authentication MyKey
S1(config-if)#standby 2 priority 100
S1(config-if)#standby 2 ip 192.168.1.2
S1(config-if)#standby 2 authentication MyKey

S2(config)#interface vlan 50
S2(config-if)#ip address 192.168.1.11 255.255.255.0
S2(config-if)#standby 1 priority 100
S2(config-if)#standby 1 ip 192.168.1.1
S2(config-if)#standby 1 authentication MyKey
S2(config-if)#standby 2 priority 200
S2(config-if)#standby 2 ip 192.168.1.2
S2(config-if)#standby 2 authentication MyKey

檢視HSRP
S1#show standby vlan 50 brief

--------------------------------------------------------
虛擬路由器備援VRRP
S1(config)#interface vlan 50
S1(config-if)#ip address 192.168.1.10 255.255.255.0
S1(config-if)#vrrp 1 priority 200
S1(config-if)#vrrp 1 ip 192.168.1.1
S1(config-if)#vrrp 2 priority 100
S1(config-if)#no vrrp 2 preempt
S1(config-if)#vrrp 2 ip 192.168.1.2


S2(config)#interface vlan 50
S2(config-if)#ip address 192.168.1.11 255.255.255.0
S2(config-if)#vrrp 1 priority 100
S2(config-if)#no vrrp 1 preempt
S2(config-if)#vrrp 1 ip 192.168.1.1
S2(config-if)#vrrp 2 priority 200
S2(config-if)#vrrp 2 ip 192.168.1.2

檢視VRRP
S1#show vrrp brief

---------------------------------------------------------
閘道負載平衡協定GLBP
S1(config)#interface vlan 50
S1(config-if)#ip address 192.168.1.10 255.255.255.0
S1(config-if)#glbp 1 priority 200
S1(config-if)#glbp 1 preempt
S1(config-if)#glbp 1 192.168.1.1

S2(config)#interface vlan 50
S2(config-if)#ip address 192.168.1.11 255.255.255.0
S2(config-if)#glbp 1 priority 150
S2(config-if)#glbp 1 preempt
S2(config-if)#glbp 1 192.168.1.1

S3(config)#interface vlan 50
S3(config-if)#ip address 192.168.1.12 255.255.255.0
S3(config-if)#glbp 1 priority 100
S3(config-if)#glbp 1 192.168.1.1

檢視GLBP
S1#show glbp brief

--------------------------------------------------------
設定備援模式
R1(config)#redundancy
R1(config-red)#mode rpr(rpr-plus | sso)

查看備援模式狀態
show redundancy states






2014年12月7日 星期日

VLAN

ISL(Inter-Switch Link)跨交換器鏈路-Cisco設備專用
VTP(VLAN Trunking Protocol)VLAN主幹通訊協定

新增VLAN
S1#config t
S1(config)#vlan 20
S1(config-vlan)#Engineering

指派交換埠給vlan
S1(config)#interface fa0/0
S1(config-if)#switchport
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan  20

VLAN Trunk設定
S1(config)#interface gi0/1
S1(config-if)#switchport trunk encapsulation dot1q
S1(config-if)#switchport trunk native vlan 20
S1(config-if)#switchport trunk allowed vlan all
S1(config-if)#switchport trunk mode dynamic desirable

檢視trunk狀態
S1#show interface fa0/1 trunk
S1#show interface status
S1#show vlan id 20
S1#show interface fa0/1 switchport
S1#show interface fa0/1 trunk

檢視vtp組態
S1#show vtp status

設定vtp管理領域
S1(config)#vtp domain Jason

設定vtp模式
S1(config)#vtp mode server
S1(config)#vtp password 12345

設定vtp版本
S1(config)#vtp vsesion 2

啟用vtp修剪
S1(config)#vtp pruning








2014年12月4日 星期四

EIGRP and OSPF

啟動EIGRP
R1#config t
R1(config)#router eigrp 20
R1(config-router)#network 172.16.0.0
R1(config-router)#network 10.0.0.0

讓某介面停用EIGRP
R1(config)#router eigrp 20
R1(config-router)#passive-interface serial 0/1

自動總結
R1#config t
R1(config)#router eigrp 20
R1(config-router)#no auto-summary

修改頻寬與延遲
R1#config t
R1(config)#int s0/0/1
R1(config-if)#bandwith 256
R1(config-if)#delay 300000

確認EIGRP的指令
R1#show ip route
R1#show ip route eigrp
R1#show ip route eigrp neighbors
R1#show ip protocols
R1#debug eigrp packet

啟用OSPF  192.168.10.65/29 and 10.255.255.81/30
R1#config t
R1(config)#router ospf 1
R1(config-router)#network 192.168.10.64 0.0.0.7 area 0
R1(config-router)#network 10.255.255.80 0.0.0.3 area 0

確認OSPF的指令
R1#show ip route
R1#show ip int brief
R1#show ip ospf
R1#show ip ospf int f0/0
R1#show ip route ospf neighbor
R1#show ip protocols
R1#debug ospf packet
R1#debug ospf hello
R1#debug ospf adj