(+84) 236.3827111 ex. 402

Lab tổng hợp về IPv6-Part2


Cho sơ đồ như sau:

Link file cấu hình pkt: https://drive.google.com/file/d/13t8PZfcKLyz3RQ6bpESL67pOdSSXaD8g/view?usp=sharing

Mô tả:

- Vùng màu cam và là mạng IPv4, các vùng còn lại là IPv6.

- Văn phòng chính chạy mạng IPv6, văn phòng chi nhánh chạy Ipv4

- Chúng ta đấu nối văn phòng chính & văn phòng chi nhánh lại với nhau thông qua hạ tầng IPv4

- Khách hàng nằm tại khu vực màu cam & dùng IPv4

- Máy chủ Web chạy IPv6 & đặt tại văn phòng chính.

4) Cấu hình trên Switch Core tại MainOffice

//Bật dual-ipv4-and-ipv6

SW-CORE(config)#sdm prefer dual-ipv4-and-ipv6 default

SW-CORE# reload

SW-CORE# show sdm prefer


//Kiểm tra cấu hình running

SW-CORE# show running-config

hostname SW-CORE

!

ipv6 unicast-routing

!

interface GigabitEthernet0/1 //Interface nối Router MainOffice

switchport trunk encapsulation dot1q

switchport mode trunk

!


!

interface Vlan1

no ip address

ipv6 address 2018:1::2/64

ipv6 enable

!

//Kiểm tra thông tin VLAN

SW-CORE# show vlan



//Kiểm tra các interface trunk

SW-CORE#show interfaces trunk

5) Cấu hình trên Router Internet

Internet# show running-config

!

hostname Internet

!

interface FastEthernet0/0

ip address 8.1.1.1 255.0.0.0

!

interface Serial0/0/0

ip address 200.1.1.2 255.255.255.252

clock rate 2000000

!

interface Serial0/1/1

ip address 200.1.2.2 255.255.255.252

clock rate 2000000

!

router ospf 100

network 200.1.1.0 0.0.0.3 area 0

network 200.1.2.0 0.0.0.3 area 0

network 8.0.0.0 0.255.255.255 area 0

!

6) Cấu hình trên Router MainOffice

6.1) Cấu hình IPv6 & IPv4

!

hostname MainOffice

!

ipv6 unicast-routing

!

ipv6 cef

!

!

interface FastEthernet0/0

ipv6 address 2018:1::1/64

ipv6 enable

!

interface FastEthernet0/0.10

encapsulation dot1Q 10

ipv6 address 2018:10::1/64

ipv6 enable

!

interface FastEthernet0/0.20

encapsulation dot1Q 20

ipv6 address 2018:20::1/64

ipv6 enable

!

interface Serial0/0/0

ip address 200.1.1.1 255.255.255.252

!

6.2) Cấu hình DHCPv6

Bước 1) Khai báo 2 pool (1 VLAN tương ứng 1 pool)

!

ipv6 dhcp pool dtu10

prefix-delegation pool dtu1010 lifetime 2592000 604800

dns-server 2018:10::3

domain-name mydtu.vn

!

ipv6 dhcp pool dtu20

prefix-delegation pool dtu2020 lifetime 2592000 604800

dns-server 2018:10::3

domain-name mydtu.vn

!

Bước 2) Khai báo Subnet cho các pool

ipv6 local pool dtu1010 2018:10::/64 64

ipv6 local pool dtu2020 2018:20::/64 64

!

Bước 3) Bật DHCP Server trên 2 interface f0/0.10 & f0/0.20

!

interface FastEthernet0/0.10

ipv6 dhcp server dtu10

!

interface FastEthernet0/0.20

ipv6 dhcp server dtu20

!

6.3) Cấu hình định tuyến IPv4

!

router ospf 100

network 200.1.1.0 0.0.0.3 area 0

!

ip route 0.0.0.0 0.0.0.0 Serial0/0/0

!

6.4) Cấu hình NAT-PT Overload

MainOffice(config)#ipv6 nat prefix 2018:2::/96

//96=128-32


MainOffice(config)#ipv6 access-list v4map_acl

MainOffice(config-ipv6-acl)# permit ipv6 2018:1::/64 2018:2::/96

MainOffice(config-ipv6-acl)# permit ipv6 2018:10::/64 2018:2::/96

MainOffice(config-ipv6-acl)# permit ipv6 2018:20::/64 2018:2::/96


//Bật NAT trên các Interface

MainOffice(config)#interface fastEthernet 0/0

MainOffice(config-if)#ipv6 nat

MainOffice(config-if)#ipv6 nat prefix 2018:2::/96 v4-mapped v4map_acl


MainOffice(config)#interface fastEthernet 0/0.10

MainOffice(config-if)#ipv6 nat

MainOffice(config-if)#ipv6 nat prefix 2018:2::/96 v4-mapped v4map_acl


MainOffice(config)#interface fastEthernet 0/0.20

MainOffice(config-if)#ipv6 nat

MainOffice(config-if)#ipv6 nat prefix 2018:2::/96 v4-mapped v4map_acl



MainOffice(config)#ipv6 access-list listipv4

MainOffice(config-ipv6-acl)# permit ipv6 2018:1::/64 2018:2::/96

MainOffice(config-ipv6-acl)# permit ipv6 2018:10::/64 2018:2::/96

MainOffice(config-ipv6-acl)# permit ipv6 2018:20::/64 2018:2::/96


MainOffice(config)#ipv6 nat v6v4 source list listipv4 interface Serial0/0/0 overload


MainOffice(config)#ip route 0.0.0.0 0.0.0.0 serial0/0/0


6.4) Cấu hình NAT IPv6 Static trên router MainOffice để truy cập vào mydtu.vn


MainOffice(config)# ip access-list extended list_ipv4

MainOffice(config-ext-nacl)# permit ip any host 200.1.1.1


MainOffice(config)# ipv6 access-list pool_to_ipv4

MainOffice(config-ipv6-acl)# permit ipv6 any 2018::/96



MainOffice(config)# ipv6 nat v4v6 pool pool_ipv4 2018:2::10 2018:2::10 prefix-length 96

MainOffice(config)# ipv6 nat v4v6 source list list_ipv4 pool pool_ipv4


MainOffice(config)# ipv6 nat v6v4 source 2018:10::2 200.1.1.1

MainOffice(config)# ipv6 nat v6v4 source list list_ipv4 pool pool_to_ipv4

(Hết)