Tải bản đầy đủ (.pdf) (24 trang)

Chương 8: Cấu hình trên IP phiên bản 6 - Thực hành

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (433.98 KB, 24 trang )

Giáo trình thực hành BSCI Chương 8 – IPv6
299

C
C
h
h
ư
ư
ơ
ơ
n
n
g
g


8
8


-
-


I
I
P
P
v
v


6
6


B
B
à
à
i
i


8
8
.
.
1
1


C
C


u
u


h
h

ì
ì
n
n
h
h


O
O
S
S
P
P
F
F
v
v
3
3


t
t
r
r
ê
ê
n
n



I
I
P
P
v
v
6
6


8
8
.
.
1
1
.
.
1
1


S
S
ơ
ơ



đ
đ




l
l
u
u


n
n


l
l
ý
ý


SW1
R1
R3
R2
FEC0::2:1/112
Lo0: 10.1.2.1/24
Lo0: 10.1.3.1/24
FEC0::3:1/112

Lo0: 10.1.1.1/24
FEC0::1:1/112
S0/3/0
S0/3/1
S0/0/1
Fa0/0
Fa0/0
S0/3/0
FEC
0
::
12
:
0
/
112
FEC
0
::
23
:
0
/
64
FEC0::13:0/112

8
8
.
.

1
1
.
.
2
2


M
M


c
c


t
t
i
i
ê
ê
u
u


b
b
à
à

i
i


t
t
h
h


c
c


h
h
à
à
n
n
h
h


Cấu hình OSPFv3 trên IPv6
8
8
.
.
1

1
.
.
3
3


H
H
ư
ư


n
n
g
g


d
d


n
n


c
c



u
u


h
h
ì
ì
n
n
h
h


v
v
à
à


h
h
ì
ì
n
n
h
h



v
v




m
m
i
i
n
n
h
h


h
h


a
a


Bước 1: Cấu hình cơ bản cho R1, R2, R3. Cấu hình địa chỉ IPv6 trên
các interface.
R1
Router(config)#hostname R1
R1(config)#enable password cisco

R1(config)#no ip domain-lookup
R1(config)#banner motd ^C R1^C
Giáo trình thực hành BSCI Chương 8 – IPv6
300

R1(config)#line console 0
R1(config-line)# logging synchronous
R1(config-line)# password cisco
R1(config-line)# login
R1(config)#line vty 0 4
R1(config-line)# password cisco
R1(config-line)# login

R1(config)#interface Serial 0/3/0
R1(config-if)#ipv6 address FEC0::12:1/112
R1(config-if)#clock rate 64000
R1(config-if)#bandwidth 64
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface Serial 0/3/1
R1(config-if)#ipv6 address FEC0::13:1/112
R1(config-if)#bandwidth 64
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface loopback 0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#ipv6 address FEC0::1:1/112
R2
Router(config)#hostname R2
R2(config)#enable password cisco

R2(config)#no ip domain-lookup
R2(config)#banner motd ^C R2^C
R2(config)#line console 0
R2(config-line)# logging synchronous
R2(config-line)# password cisco
R2(config-line)# login
R2(config)#line vty 0 4
R2(config-line)# password cisco
R2(config-line)# login

R2(config)#interface serial 0/0/1
R2(config-if)#ipv6 address FEC0::12:2/112
R2(config-if)#bandwidth 64
R2(config-if)#no shutdown
R2(config-if)#exit
Giáo trình thực hành BSCI Chương 8 – IPv6
301

R2(config)#interface fastEthernet 0/0
R2(config-if)#ipv6 address FEC0:23::2/64
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface loopback 0
R2(config-if)#ip address 10.1.2.1 255.255.255.0
R2(config-if)#ipv6 address FEC0::2:1/112
R2(config-if)#exit
R3
Router(config)#hostname R3
R3(config)#enable password cisco
R3(config)#no ip domain-lookup

R3(config)#banner motd ^C R3^C
R3(config)#line console 0
R3(config-line)# logging synchronous
R3(config-line)# password cisco
R3(config-line)# login
R3(config)#line vty 0 4
R3(config-line)# password cisco
R3(config-line)# login

R3(config)#interface serial 0/3/0
R3(config-if)#ipv6 address FEC0::13:3/112
R3(config-if)#clock rate 64000
R3(config-if)#bandwidth 64
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)#ipv6 address FEC0:23::3/64
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface loopback 0
R3(config-if)#ip address 10.1.3.1 255.255.255.0
R3(config-if)#ipv6 address FEC0::3:1/112
R3(config-if)#exit
Giáo trình thực hành BSCI Chương 8 – IPv6
302

Kiểm tra cấu hinh

Hình 8.1.3-1: Show ipv6 interface brief trên R1


Hình 8.1.3-2: Show ipv6 interface brief trên R2

Hình 8.1.3-3: Show ipv6 interface brief trên R3
Bước 2: Chuyển thành địa chỉ default link-local trên interface R1 và R2
Cấu hình trên R1
R1(config)#interface Serial 0/3/0
R1(config-if)#ipv6 address FE80::1 link-local
R1(config-if)#exit
Cấu hình trên R2
R2(config)#interface Serial 0/0/1
R2(config-if)#ipv6 address FE80::2 link-local
R2(config-if)#exit
Kiểm tra cấu hình
Giáo trình thực hành BSCI Chương 8 – IPv6
303


Hình 8.1.3-4: Show ipv6 interface trên R1

Hình 8.1.3-5: Show ipv6 interface trên R2
Bước 3: Cấu hình địa chỉ EUI-64 IPv6 trên interface R1 và R3
Cấu hình trên R1
R1(config)#interface Serial 0/3/1
R1(config-if)#ipv6 address FEC0:13::/64 eui-64
R1(config-if)#exit
Cấu hình trên R3
R3(config)#int Serial 0/0
R3(config-if)#ipv6 address FEC0:13::/64 eui-64
R3(config-if)#exit
Giáo trình thực hành BSCI Chương 8 – IPv6

304

Kiểm tra cấu hình

Hình 8.1.3-6: Show ipv6 interface trên R1

Hình 8.1.3-7: Show ipv6 interface trên R2
Bước 4: Bật tính năng IPv6 routing và CEF
R1(config)#ipv6 unicast-routing
R1(config)#ipv6 cef

R2(config)#ipv6 unicast-routing
R2(config)#ipv6 cef

R3(config)#ipv6 unicast-routing
R3(config)#ipv6 cef
Bước 5: Cấu hình OSPFv3
Cấu hình trên R1
R1(config)#ipv6 router ospf 1
R1(config-rtr)#router-id 10.1.1.1
R1(config-rtr)#exit
R1(config)#interface Serial 0/3/0
Giáo trình thực hành BSCI Chương 8 – IPv6
305

R1(config-if)#ipv6 ospf 1 area 0
R1(config-if)#exit
R1(config)#interface Serial 0/3/1
R1(config-if)#ipv6 ospf 1 area 0
R1(config-if)#exit

R1(config)#interface loopback 0
R1(config-if)#ipv6 ospf 1 area 0
R1(config-if)#exit
Cấu hình trên R2
R2(config)#ipv6 router ospf 1
R2(config-rtr)#router-id 10.1.2.1
R2(config-rtr)#exit
R2(config)#interface Serial 0/0/1
R2(config-if)#ipv6 ospf 1 area 0
R2(config-if)#exit
R2(config)#interface FastEthernet 0/0
R2(config-if)#ipv6 ospf 1 area 0
R2(config-if)#exit
R2(config)#interface loopback 0
R2(config-if)#ipv6 ospf 1 area 0
R2(config-if)#exit
Cấu hình trên R3
R3(config)#ipv6 router ospf 1
R3(config-rtr)#router-id 10.1.3.1
R3(config-rtr)#exit
R3(config)#interface Serial 0/3/0
R3(config-if)#ipv6 ospf 1 area 0
R3(config-if)#exit
R3(config)#interface FastEthernet 0/0
R3(config-if)#ipv6 ospf 1 area 0
R3(config-if)#exi
Kiểm tra cấu hình

Hình 8.1.3-8: Show ipv6 ospf neighbor trên R1
Giáo trình thực hành BSCI Chương 8 – IPv6

306


Hình 8.1.3-9: Show ipv6 route trên R1

Hình 8.1.3-10: Show ipv6 ospf neighbor trên R2
Giáo trình thực hành BSCI Chương 8 – IPv6
307


Hình 8.1.3-11: Show ipv6 route trên R2

Hình 8.1.3-12: Show ipv6 ospf neighbor trên R3
Giáo trình thực hành BSCI Chương 8 – IPv6
308


Hình 8.1.3-13: Show ipv6 route trên R3
Giáo trình thực hành BSCI Chương 8 – IPv6
309


B
B
à
à
i
i



8
8
.
.
2
2


S
S




d
d


n
n
g
g


M
M
a
a
n
n

u
u
a
a
l
l


I
I
P
P
v
v
6
6


T
T
u
u
n
n
n
n
e
e
l
l



v
v


i
i


E
E
I
I
G
G
R
R
P
P


c
c
h
h
o
o



I
I
P
P
v
v
6
6


8
8
.
.
2
2
.
.
1
1


S
S
ơ
ơ


đ
đ





l
l
u
u


n
n


l
l
ý
ý


R1
R3
R2
Lo0: 10.1.2.1/24
Lo0: 10.1.3.1/24
FEC0::3:1/112
Lo0: 10.1.1.1/24
FEC0::1:1/112
S0/0/1
S0/3/0

S0/3/0
172.16.12.0/24
172.16.23.0/24
FEC0::13:0/64
Tunnel
S0/3/1

8
8
.
.
2
2
.
.
2
2


M
M


c
c


t
t
i

i
ê
ê
u
u


b
b
à
à
i
i


t
t
h
h


c
c


h
h
à
à
n

n
h
h


Manual IPv6 Tunnel với EIGRP cho IPv6
8
8
.
.
2
2
.
.
3
3


H
H
ư
ư


n
n
g
g



d
d


n
n


c
c


u
u


h
h
ì
ì
n
n
h
h


v
v
à
à



h
h
ì
ì
n
n
h
h


v
v




m
m
i
i
n
n
h
h


h
h



a
a


Bước 1: Cấu hình cơ bản R1, R2, R3. Gán địa chỉ theo hình vẽ
R1
Router(config)#hostname R1
R1(config)#enable password cisco
R1(config)#no ip domain-lookup
R1(config)#banner motd ^C R1^C
R1(config)#line console 0
R1(config-line)# logging synchronous
R1(config-line)# password cisco
Giáo trình thực hành BSCI Chương 8 – IPv6
310

R1(config-line)# login
R1(config)#line vty 0 4
R1(config-line)# password cisco
R1(config-line)# login

R1(config)#interface Serial 0/0/1
R1(config-if)#ip address 172.16.12.1 255.255.255.0
R1(config-if)#bandwidth 64
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface loopback 0
R1(config-if)#ip address 10.1.1.1 255.255.255.0

R1(config-if)#ipv6 address FEC0::1:1/112
R2
Router(config)#hostname R2
R2(config)#enable password cisco
R2(config)#no ip domain-lookup
R2(config)#banner motd ^C R2^C
R2(config)#line console 0
R2(config-line)# logging synchronous
R2(config-line)# password cisco
R2(config-line)# login
R2(config)#line vty 0 4
R2(config-line)# password cisco
R2(config-line)# login

R2(config)#interface serial 0/3/0
R2(config-if)#ip address172.16.12.2 255.255.255.0
R2(config-if)#clock rate 64000
R2(config-if)#bandwidth 64
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface serial 0/3/1
R2(config-if)#ip address 172.16.23.2 255.255.255.0
R2(config-if)#bandwidth 64
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface loopback 0
R2(config-if)#ip address 10.1.2.1 255.255.255.0
R2(config-if)#exit
Giáo trình thực hành BSCI Chương 8 – IPv6
311


R3
Router(config)#hostname R3
R3(config)#enable password cisco
R3(config)#no ip domain-lookup
R3(config)#banner motd ^C R3^C
R3(config)#line console 0
R3(config-line)# logging synchronous
R3(config-line)# password cisco
R3(config-line)# login
R3(config)#line vty 0 4
R3(config-line)# password cisco
R3(config-line)# login

R3(config)#interface serial 0/3/0
R3(config-if)#ip address 172.16.23.3 255.255.255.0
R3(config-if)#clock rate 64000
R3(config-if)#bandwidth 64
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface loopback 0
R3(config-if)#ip address 10.1.3.1 255.255.255.0
R3(config-if)#ipv6 address FEC0::3:1/112
R3(config-if)#exit
Kiểm tra cấu hinh

Hình 8.2.3-1: show ip interface brief trên R1

Hình 8.2.3-2: show ip interface brief trên R2
Giáo trình thực hành BSCI Chương 8 – IPv6

312


Hình 8.2.3-3: show ip interface brief trên R3
Bước 2: Cấu hình EIGRP cho IPv4
Cấu hình trên R1
R1(config)#router eigrp 1
R1(config-router)#network 10.0.0.0
R1(config-router)#network 172.16.0.0
R1(config-router)#no auto-summary
R1(config-router)#exit
Cấu hình trên R2
R2(config)#router eigrp 1
R2(config-router)#network 10.0.0.0
R2(config-router)#network 172.16.0.0
R2(config-router)#no auto-summary
R2(config-router)#exit
Cấu hình trên R3
R3(config)#router eigrp 1
R3(config-router)#network 10.0.0.0
R3(config-router)#network 172.16.0.0
R3(config-router)#no auto-summary
R3(config-router)#exit
Kiểm tra cấu hình

Hình 8.2.3-4: Show ip eigrp neighbors trên R1

Hình 8.2.3-5: Show ip route eigrp trên R1

Hình 8.2.3-6: Show ip eigrp neighbors trên R2

Giáo trình thực hành BSCI Chương 8 – IPv6
313


Hình 8.2.3-7: Show ip route eigrp trên R2

Hình 8.2.3-8: Show ip eigrp neighbors trên R3

Hình 8.2.3-9: Show ip route eigrp trên R3
Bước 3: Tạo một manual IPv6 Tunnel
Cấu hình trên R1
R1(config)#interface tunnel 0
R1(config-if)# ipv6 address FEC0::13:1/112
R1(config-if)# tunnel source Serial0/0/1
R1(config-if)# tunnel destination 172.16.23.3
R1(config-if)# tunnel mode ipv6ip
R1(config-if)#exit
Cấu hình trên R3
R1(config)#interface tunnel 0
R1(config-if)# ipv6 address FEC0::13:1/112
R1(config-if)# tunnel source Serial0/0/1
R1(config-if)# tunnel destination 172.16.23.3
R1(config-if)# tunnel mode ipv6ip
R1(config-if)#exit
Kiểm tra cấu hình

Hình 8.2.3-10: show ipv6 interface brief trên R1
Giáo trình thực hành BSCI Chương 8 – IPv6
314



Hình 8.2.3-11: show ipv6 interface brief trên R3
Bước 4: Cấu hình EIGRP cho IPv6 sử dụng tunnel
Cấu hình trên R1
R1(config)#ipv6 unicast-routing
R1(config)#interface Loopback0
R1(config-if)#ipv6 eigrp 100
R1(config)#interface Tunnel0
R1(config-if)#ipv6 eigrp 100
Cấu hình trên R3
R3(config)#ipv6 unicast-routing
R3(config)#interface Loopback0
R3(config-if)#ipv6 eigrp 100
R3(config)#interface Tunnel0
R3(config-if)#ipv6 eigrp 100
Kiểm tra cấu hình

Hình 8.2.3-12: Show ipv6 eigrp neighbors trên R1

Hình 8.2.3-13: Show ipv6 route trên R1
Giáo trình thực hành BSCI Chương 8 – IPv6
315


Hình 8.2.3-14: Show ipv6 eigrp neighbors trên R3

Hình 8.2.3-15: Show ipv6 route trên R3
Giáo trình thực hành BSCI Chương 8 – IPv6
316



B
B
à
à
i
i


8
8
.
.
3
3


C
C


u
u


h
h
ì
ì
n

n
h
h


6
6
t
t
o
o
4
4


T
T
u
u
n
n
n
n
e
e
l
l
s
s



8
8
.
.
3
3
.
.
1
1


S
S
ơ
ơ


đ
đ




l
l
u
u



n
n


l
l
ý
ý


R2
Lo0: 10.1.2.1/24
Lo0: 10.1.3.1/24
FEC0::3:1/112
Lo0: 10.1.1.1/24
FEC0::1:1/112
S0/0/1
S0/3/0
S0/3/0
172.16.12.0/24
172.16.23.0/24
6to4 Tunnel
S0/3/1
R3
R1
Lo11: 2002:AC10:C01:11::1/64
Lo12: 2002:AC10:C01:12::1/64
Lo31: 2002:AC10:1703:31::1/64
Lo32: 2002:AC10:1703:32::1/64


8
8
.
.
3
3
.
.
2
2


M
M


c
c


t
t
i
i
ê
ê
u
u



b
b
à
à
i
i


t
t
h
h


c
c


h
h
à
à
n
n
h
h


Cấu hình 6to4 Tunnel

8
8
.
.
3
3
.
.
3
3


H
H
ư
ư


n
n
g
g


d
d


n
n



c
c


u
u


h
h
ì
ì
n
n
h
h


v
v
à
à


h
h
ì
ì

n
n
h
h


v
v




m
m
i
i
n
n
h
h


h
h


a
a



Bước 1: Cấu hình cơ bản cho R1, R2, R3. Gán địa chỉ như hình vẽ
R1
Router(config)#hostname R1
R1(config)#enable password cisco
R1(config)#no ip domain-lookup
R1(config)#banner motd ^C R1^C
R1(config)#line console 0
R1(config-line)# logging synchronous
R1(config-line)# password cisco
R1(config-line)# login
R1(config)#line vty 0 4
Giáo trình thực hành BSCI Chương 8 – IPv6
317

R1(config-line)# password cisco
R1(config-line)# login

R1(config)#interface Serial 0/0/1
R1(config-if)#ip address 172.16.12.1 255.255.255.0
R1(config-if)#bandwidth 64
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface loopback 0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#ipv6 address FEC0::1:1/112
R1(config-if)#exit
R1(config)#interface loopback 11
R1(config-if)#ipv6 address 2002:AC10:C01:11::1/64
R1(config-if)#exit
R1(config)#interface loopback 12

R1(config-if)#ipv6 address 2002:AC10:C01:12::1/64
R1(config-if)#exit
R2
Router(config)#hostname R2
R2(config)#enable password cisco
R2(config)#no ip domain-lookup
R2(config)#banner motd ^C R2^C
R2(config)#line console 0
R2(config-line)# logging synchronous
R2(config-line)# password cisco
R2(config-line)# login
R2(config)#line vty 0 4
R2(config-line)# password cisco
R2(config-line)# login

R2(config)#interface serial 0/3/0
R2(config-if)#ip address172.16.12.2 255.255.255.0
R2(config-if)#clock rate 64000
R2(config-if)#bandwidth 64
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface serial 0/3/1
R2(config-if)#ip address 172.16.23.2 255.255.255.0
R2(config-if)#bandwidth 64
Giáo trình thực hành BSCI Chương 8 – IPv6
318

R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface loopback 0

R2(config-if)#ip address 10.1.2.1 255.255.255.0
R2(config-if)#exit
R3
Router(config)#hostname R3
R3(config)#enable password cisco
R3(config)#no ip domain-lookup
R3(config)#banner motd ^C R3^C
R3(config)#line console 0
R3(config-line)# logging synchronous
R3(config-line)# password cisco
R3(config-line)# login
R3(config)#line vty 0 4
R3(config-line)# password cisco
R3(config-line)# login

R3(config)#interface serial 0/3/0
R3(config-if)#ip address 172.16.23.3 255.255.255.0
R3(config-if)#clock rate 64000
R3(config-if)#bandwidth 64
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface loopback 0
R3(config-if)#ip address 10.1.3.1 255.255.255.0
R3(config-if)#ipv6 address FEC0::3:1/112
R3(config-if)#exit
R3(config)#interface loopback 31
R3(config-if)#ipv6 address 2002:AC10:1703:31::1/64
R3(config-if)#exit
R3(config)#interface loopback 32
R3(config-if)#ipv6 address 2002:AC10:1703:32::1/64

R3(config-if)#exit
Kiểm tra cấu hinh
Giáo trình thực hành BSCI Chương 8 – IPv6
319


Hình 8.3.3-1: Show ip interface brief trên R1

Hình 8.3.3-2: Show ip interface brief trên R2

Hình 8.3.3-3: Show ip interface brief trên R3
Bước 2: Cấu hình EIGRP cho IPv4
Cấu hình trên R1
R1(config)#router eigrp 1
R1(config-router)#network 10.0.0.0
R1(config-router)#network 172.16.0.0
R1(config-router)#no auto-summary
R1(config-router)#exit
Cấu hình trên R2
R2(config)#router eigrp 1
R2(config-router)#network 10.0.0.0
R2(config-router)#network 172.16.0.0
R2(config-router)#no auto-summary
R2(config-router)#exit
Cấu hình trên R3
R3(config)#router eigrp 1
R3(config-router)#network 10.0.0.0
R3(config-router)#network 172.16.0.0
R3(config-router)#no auto-summary
R3(config-router)#exit

Kiểm tra cấu hình
Giáo trình thực hành BSCI Chương 8 – IPv6
320


Hình 8.3.3-4: Show ip eigrp neighbors trên R1

Hình 8.3.3-5: Show ip route eigrp trên R1

Hình 8.3.3-6: Show ip eigrp neighbors trên R2

Hình 8.3.3-7: Show ip route eigrp trên R2

Hình 8.3.3-8: Show ip eigrp neighbors trên R3

Hình 8.3.3-9: Show ip route eigrp trên R3
Bước 3: Tạo một 6to4 Tunnel
Cấu hình trên R1
R1(config)#interface tunnel 0
R1(config-if)# ipv6 address 2002:AC10:C01:1::1/64
R1(config-if)# tunnel source Serial0/0/1
R1(config-if)# tunnel mode ipv6ip 6to4
R1(config-if)#exit
Cấu hình trên R3
R3(config)#interface tunnel 0
R3(config-if)# ipv6 address 2002:AC10:1703:1::3/64
Giáo trình thực hành BSCI Chương 8 – IPv6
321

R3(config-if)# tunnel source Serial0/0/1

R3(config-if)# tunnel mode ipv6ip 6to4
R3(config-if)#exit
Kiểm tra cấu hình

Hình 8.3.3-10: Show ipv6 interface brief trên R1

Hình 8.3.3-11: Show ipv6 interface brief trên R2
Bước 4: Cấu hình static IPv6 route
R1(config)#ipv6 route 2002::/16 Tunnel0
R1(config)#ipv6 route FEC0::3:0/112 2002:AC10:1703:1::3

R3(config)#ipv6 route 2002::/16 Tunnel0
R3(config)#ipv6 route FEC0::1:0/112 2002:AC10:C01:1::1


Hình 8.3.3-12: Show ipv6 route trên R1
Giáo trình thực hành BSCI Chương 8 – IPv6
322


Hình 8.3.3-13: Show ipv6 route trên R2

×