Cisco复习(VTP、单臂、EIGRP)

Standard


VTP

S_Core#vlan database
S_Core(vlan)#vtp domain S_Core
S_Core(vlan)#vtp server
 
S1#vlan database
S1(vlan)#vtp domain S_Core
S1(vlan)#vtp client
 
S2#vlan database
S2(vlan)#vtp domain S_Core
S2(vlan)#vtp client
 
S_Core(config)#int gigabitEthernet 0/1
S_Core(config-if)#switchport trunk encapsulation dot1q
S_Core(config-if)#switchport mode trunk
S_Core(config)#int gigabitEthernet 0/2
S_Core(config-if)#switchport trunk encapsulation dot1q
S_Core(config-if)#switchport mode trunk
 
S1(config)#int gigabitEthernet 1/1
S1(config-if)#switchport mode trunk
 
S2(config)#int gigabitEthernet 1/2
S2(config-if)#switchport mode trunk
 
S_Core(vlan)#vlan 10 name counter
S_Core(vlan)#vlan 11 name market
 
S1(config)#int fastethernet 0/1
S1(config-if)#switchport access vlan 10
S1(config)#int fastethernet 0/2
S1(config-if)#switchport access vlan 11
...
S2(config)#int fastethernet 0/1
S2(config-if)#switchport access vlan 10
S2(config)#int fastethernet 0/2
S2(config-if)#switchport access vlan 11


单臂路由

R1(config)#int f0/0
R1(config-if)#no shut
R1(config-if)#int f0/0.1
R1(config-if)#ip add 192.168.10.1 255.255.255.0
R1(config-if)#encapsulation dot1Q 10
R1(config-if)#no shut
R1(config-if)#int f0/0.2
R1(config-if)#ip add 192.168.20.1 255.255.255.0
R1(config-if)#encapsulation dot1Q 20
R1(config-if)#no shut
 
S1(config)#vlan database
S1(vlan)#vlan 10 name developer
S1(vlan)#vlan 20 name marketing
S1(vlan)#exit
S1(config)#int f0/1
S1(config-if)#switchport mode trunk
S1(config-if)#int f0/2
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 10
S1(config-if)#int f0/3
S1(config-if)#switchport access vlan 20


EIGRP

R1(config)#router eigrp 100
R1(config-router)#network 192.168.1.0
R1(config-router)#network 192.168.10.0
R1(config-router)#network 192.168.20.0
 
R2(config)#router eigrp 100
R2(config-router)#network 192.168.1.0
R2(config-router)#network 192.168.2.0
 
R3(config)#router eigrp 100
R3(config-router)#network 192.168.2.0
R3(config-router)#network 10.1.1.0
 
R2#show ip router
R2#show ip eigrp neighbors


EIGRP非等价带宽负载均衡

R1(config)#int eth 1/0
R1(config-if)#ip add 172.16.1.1 255.255.255.0
R1(config-if)#exit
R1(config)#router eigrp 100
R1(config-router)#network 172.16.1.0
 
R2(config)#int eth 1/0
R2(config-if)#ip add 172.16.1.2 255.255.255.0
R2(config-if)#exit
R2(config)#router eigrp 100
R2(config-router)#network 172.16.1.0
 
R1#show ip eigrp topology 
...
P 192.168.2.0/24, 2 successors, FD is 2195456
         via 172.16.1.2 (2195456/2169856), Ethernet1/0
         via 192.168.1.2 (2681856/2169856), Serial0/0
P 10.0.0.0/8, 2 successors, FD is 2198016
         via 172.16.1.2 (2198016/2172416), Ethernet1/0
         via 192.168.1.2 (2684416/2172416), Serial0/0
...
//此处看到eth1/0可行距离为2195456,要小于s0/0的数值。
//因为值越小越优先,路由会选取最小值,为了进行非等价负载,在eigrp协议中有variance这个参数。
//它的含义是把最优路径乘以此值,以让次优路径加入到路由选择表中。
//此处我们只要乘以2,那个s0/0的可行距离值就大于e1/0了。
R1#conf t
R1(config)#router eigrp 100
R1(config-router)#variance 2
R1(config-router)#end
 
R1#show ip route
D    10.0.0.0/8 [90/2198016] via 172.16.1.2, 00:02:59, Ethernet1/0
                [90/2684416] via 192.168.1.2, 00:02:59, Serial0/0
D    192.168.2.0/24 [90/2195456] via 172.16.1.2, 00:03:00, Ethernet1/0
                    [90/2681856] via 192.168.1.2, 00:02:59, Serial0/0
...
 
R2#conf t
R2(config)#router eigrp 100
R2(config-router)#variance 2
R2(config-router)#end

转载请注明出处:http://yemaosheng.com

One thought on “Cisco复习(VTP、单臂、EIGRP)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.