Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R3
R3(config)#interface ethernet 0/0
R3(config-if)#no shutdown
R3(config-if)#ipv6 enable
R3(config-if)#ipv6 address FE80::3 link-local
R3(config-if)#exit
R3(config)#ipv6 unicast-routing
R3(config)#end
R3#
R3#show ipv6 interface ethernet 0/0
Ethernet0/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::3
No Virtual link-local address(es):
No global unicast address is configured
Joined group address(es):
FF02::1
FF02::2
FF02::1:FF00:3
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are sent
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds (using 30000)
ND advertised reachable time is 0 (unspecified)
ND advertised retransmit interval is 0 (unspecified)
ND router advertisements are sent every 200 seconds
ND router advertisements live for 1800 seconds
ND advertised default router preference is Medium
Hosts use stateless autoconfig for addresses.
R3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#interface ethernet 0/0
R3(config-if)#ipv6 address 2001:100:1:1::3/64
R3(config-if)#exit
R3(config)#exit
R3#
R1:
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface ethernet 0/0
R1(config-if)#no shutdown
R1(config-if)#ipv6 enable
R1(config-if)#ipv6 address FE80::1 link-local
R1(config-if)#ipv6 address 2001:100:1:1::1/64
R1(config-if)#end
R1#show ipv6 interface ethernet 0/0
Ethernet0/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::1
No Virtual link-local address(es):
Global unicast address(es):
2001:100:1:1::1, subnet is 2001:100:1:1::/64
Joined group address(es):
FF02::1
FF02::1:FF00:1
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are sent
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds (using 30000)
ND NS retransmit interval is 1000 milliseconds
Default router is FE80::3 on Ethernet0/0
R1#ping FE80::1
Output Interface: Ethernet0/0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FE80::1, timeout is 2 seconds:
Packet sent with a source address of FE80::1%Ethernet0/0
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 5/5/5 ms
R1#ping 2001:100:1:1::3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:100:1:1::3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/17 ms
R1(config)#interface ethernet 0/1
R1(config-if)#ipv6 enable
R1(config-if)#ipv6 address 2001:12:1::1/64
R1(config-if)#ipv6 address FE80::1 link-local
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#do show ipv6 interface ethernet 0/1
Ethernet0/1 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::1
No Virtual link-local address(es):
Global unicast address(es):
2001:12:1::1, subnet is 2001:12:1::/64
Joined group address(es):
FF02::1
FF02::1:FF00:1
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are sent
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds (using 30000)
ND NS retransmit interval is 1000 milliseconds
Default router is FE80::3 on Ethernet0/0
R1(config)#
R2:
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#interface ethernet 0/1
R2(config-if)#ipv6 enable
R2(config-if)#ipv6 address 2001:12:1::2/64
R2(config-if)#ipv6 address FE80::2 link-local
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#ipv6 unicast-routing
R2(config)#interface ethernet 0/0
R2(config-if)#no shutdown
R2(config-if)#ipv6 address 2001:200:1:1::2/64
R2(config-if)#ipv6 address FE80::2 link-local
R2(config-if)#exit
R2(config)#
R4:
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R4
R4(config)#interface ethernet 0/0
R4(config-if)#no shutdown
R4(config-if)#ipv6 enable
R4(config-if)#ipv6 address autoconfig
R4(config-if)#exit
R4(config)#do show ipv6 interface ethernet 0/0
Ethernet0/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::A8BB:CCFF:FE00:4000
No Virtual link-local address(es):
Stateless address autoconfig enabled
Global unicast address(es):
2001:200:1:1:A8BB:CCFF:FE00:4000, subnet is 2001:200:1:1::/64 [EUI/CAL/PRE]
valid lifetime 2591983 preferred lifetime 604783
Joined group address(es):
FF02::1
FF02::1:FF00:4000
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are sent
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds (using 30000)
ND NS retransmit interval is 1000 milliseconds
Default router is FE80::2 on Ethernet0/0
R4(config)#
思科静态路由的写法:
ipv6 route 目标地址/掩码 出接口 下一跳
下一跳可以写link-local地址
RIP试验:
R1:
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface fastEthernet 0/0
R1(config-if)#ipv6 enable
R1(config-if)#ipv6 address 2001:12:1:1::1/64
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface loopback 0
R1(config-if)#ipv6 enable
R1(config-if)#ipv6 address 1::1/128
R1(config-if)#exit
R1(config)#interface fastEthernet 1/0
R1(config-if)#ipv6 enable
R1(config-if)#ipv6 address 2001:13:1:1::1/64
R1(config-if)#no shutdown
R1(config-if)#exit
R2与R3同上配置
R2 : fastEthernet0/0:2001:12:1:1::2/64
loopback0: 2::2/128
R3: fastEthernet1/0: 2001:13:1:1::3/64
loopback0: 3::3/128
ipv6 unicast-routing (启用IPV6路由功能,R1,R2,R3必须启用)
启用进程:
R1(config)#ipv6 router rip R1(进程号,启用,名字可以是数字,可以是字母)
R1(config-rtr)#exit
R1(config)#interface range loopback 0 , fastEthernet 0/0 , fastEthernet 1/0(进入接口组)
R1(config-if-range)#ipv6 rip R1 enable (启用RIP)
R1(config-if-range)#end
查看
R1#show ipv6 protocols
IPv6 Routing Protocol is "connected"
IPv6 Routing Protocol is "ND"
IPv6 Routing Protocol is "rip R1"
Interfaces:
FastEthernet1/0
FastEthernet0/0
Loopback0
Redistribution:
None
R2与R3同R1
R2(config)#ipv6 router rip R2
R2(config-rtr)#exit
R2(config)#interface range loopback 0 , fastEthernet 0/0
R2(config-if-range)#ipv6 rip R2 enable
R2(config-if-range)#exit
R3(config)#ipv6 router rip R3
R3(config-rtr)#exit
R3(config)#interface range loopback 0 , fastEthernet 1/0
R3(config-if-range)#ipv6 rip R3 enable
R3(config-if-range)#end
R3#show ipv6 route
IPv6 Routing Table - default - 6 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
IS - ISIS summary, D - EIGRP, EX - EIGRP external, ND - ND Default
NDp - ND Prefix, DCE - Destination, NDr - Redirect, O - OSPF Intra
OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
ON2 - OSPF NSSA ext 2
R 1::1/128 [120/2]
via FE80::C801:10FF:FEA7:1C, FastEthernet1/0
R 2::2/128 [120/3]
via FE80::C801:10FF:FEA7:1C, FastEthernet1/0
LC 3::3/128 [0/0]
via Loopback0, receive
R 2001:12:1:1::/64 [120/2]
via FE80::C801:10FF:FEA7:1C, FastEthernet1/0
C 2001:13:1:1::/64 [0/0]
via FastEthernet1/0, directly connected
L FF00::/8 [0/0]
via Null0, receive
测试联通:
R3#ping 2::2 source 3::3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2::2, timeout is 2 seconds:
Packet sent with a source address of 3::3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/49/84 ms
R3#
EIGRP试验:
R2:
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#interface fastEthernet 0/0
R2(config-if)#ipv6 enable
R2(config-if)#ipv6 address 2001:12:1:1::2/64
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface loopback 0
R2(config-if)#ipv6 enable
R2(config-if)#ipv6 address 2::2/128
R2(config-if)#exit
R2(config)#ipv6 unicast-routing
R1与R3同R1配置:
R1: fastEthernet0/0: 2001:12:1:1::1/64
loopback0: 1::1/128
fastEthernet1/0: 2001:13:1:1::1/64
R3: fastEthernet1/0: 2001:13:1:1::3/64
loopback0: 3::3/128
R2:
R2(config)#ipv6 router eigrp 90(这个进程号具有全局意义,多个路由器要一样)
R2(config-rtr)#no shutdown
R2(config-rtr)#eigrp router-id 2.2.2.2
R2(config-rtr)#exit
R2(config)#interface range loopback 0 , fastEthernet 0/0
R2(config-if-range)#ipv6 eigrp 90
R2(config-if-range)#end
R1:
R1(config)#router eigrp CCIE
R1(config-router)#address-family ipv6 unicast autonomous-system 90
R1(config-router-af)#eigrp router-id 1.1.1.1
R1(config-router-af)#no shutdown
R1(config-router-af)#exit
R1(config-router)#exit
R1(config)#interface loopback 0
R1(config-if)#ipv6 eigrp 90
R1(config-if)#exit
R1(config)#interface fastEthernet 0/0
R1(config-if)#ipv6 eigrp 90
R1(config-if)#exit
R1(config)#interface fastEthernet 1/0
R1(config-if)#ipv6 eigrp 90
R1(config-if)#exit
R3同R2和R1一样,配置EIGRP
查看配置:
R3>show ipv6 eigrp topology
EIGRP-IPv6 VR(CCIE) Topology Table for AS(90)/ID(3.3.3.3)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 3::3/128, 1 successors, FD is 163840
via Connected, Loopback0
P 1::1/128, 1 successors, FD is 13189120
via FE80::C801:13FF:FEF5:1C (13189120/163840), FastEthernet1/0
P 2001:12:1:1::/64, 1 successors, FD is 19660800
via FE80::C801:13FF:FEF5:1C (19660800/13107200), FastEthernet1/0
P 2001:13:1:1::/64, 1 successors, FD is 13107200
via Connected, FastEthernet1/0
P 2::2/128, 1 successors, FD is 347340800
via FE80::C801:13FF:FEF5:1C (347340800/340787200), FastEthernet1/0
R3>show ipv6 route eigrp
IPv6 Routing Table - default - 7 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
IS - ISIS summary, D - EIGRP, EX - EIGRP external, ND - ND Default
NDp - ND Prefix, DCE - Destination, NDr - Redirect, O - OSPF Intra
OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
ON2 - OSPF NSSA ext 2
D 1::1/128 [90/103040]
via FE80::C801:13FF:FEF5:1C, FastEthernet1/0
D 2::2/128 [90/2713600]
via FE80::C801:13FF:FEF5:1C, FastEthernet1/0
D 2001:12:1:1::/64 [90/153600]
via FE80::C801:13FF:FEF5:1C, FastEthernet1/0
R3>
ospf试验:
在EIGRP的基础上配置:
结束掉EIGRP进程:
no ipv6 router eigrp 90
no router eigrp CCIE
R1:
R1(config)#router ospfv3 110
R1(config-router)#address-family ipv6 unicast
R1(config-router-af)#router-id 1.1.1.1
R1(config-router-af)#exit-address-family
R1(config-router)#exit
R1(config)#interface range loopback 0 , fastEthernet 0/0 , fastEthernet 1/0
R1(config-if-range)#ospfv3 110 ipv6 area 0
R1(config-if-range)#end
R2:
R2(config)#router ospfv3 110
R2(config-router)#address-family ipv6 unicast
R2(config-router-af)# router-id 2.2.2.2
R2(config-router-af)#exit-address-family
R2(config-router)#exit
R2(config)#interface range loopback 0 , fastEthernet 0/0
R2(config-if-range)#ospfv3 110 ipv6 area 0
R2(config-if-range)#exit
R2(config)#exit
R3:
R3(config)#ipv6 router ospf 110
R3(config-rtr)#router-id 3.3.3.3
R3(config-rtr)#exit
R3(config)#interface range fastEthernet 1/0 , loopback 0
R3(config-if-range)#ipv6 ospf 110 area 0
R3(config-if-range)#exit
R3>show ipv6 route ospf
IPv6 Routing Table - default - 7 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
IS - ISIS summary, D - EIGRP, EX - EIGRP external, ND - ND Default
NDp - ND Prefix, DCE - Destination, NDr - Redirect, O - OSPF Intra
OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
ON2 - OSPF NSSA ext 2
O 1::1/128 [110/1]
via FE80::C801:13FF:FEF5:1C, FastEthernet1/0
O 2::2/128 [110/2]
via FE80::C801:13FF:FEF5:1C, FastEthernet1/0
O 2001:12:1:1::/64 [110/2]
via FE80::C801:13FF:FEF5:1C, FastEthernet1/0
R3>
R3>ping 1::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/38/112 ms
R3>