CÔNG TY TNHH CÔNG NGHỆ VIỆT THÁI DƯƠNG
Logo CNTTShop.vn

NTT03, Line 1, Thống Nhất Complex, Thanh Xuân, Hà Nội.
Danh mục sản phẩm

Configure IPv6 Static NULL0 Interface Route

Network Requirements

  • On Device1 and Device2, configure one static default route respectively, and the gateway addresses are the peer interface addresses of the two devices. On Device1, configure the static Null0 interface route, and can filter the data to PC2.

Network Topology

Networking for configuring IPv6 static NULL0 interface route

Figure 4-3 Networking for configuring IPv6 static NULL0 interface route

Configuration Steps

Step 1: Configure the IPv6 address of the interface (omitted).

Step 2: Configure the IPv6 static route.

#Configure Device1.

Device1#configure terminal
Device1(config)#ipv6 route ::/0 2001:2::2

#Configure Device2.

Device2#configure terminal
Device2(config)#ipv6 route ::/0 2001:2::1

#On PC1, use the ping command to check the connectivity.

C:\Documents and Settings\Administrator>ping 2001:3::2
Pinging 2001:3::2 with 32 bytes of data: 
Reply from 2001:3::2: bytes=32 time<1ms TTL=128
Reply from 2001:3::2: bytes=32 time<1ms TTL=128
Reply from 2001:3::2: bytes=32 time<1ms TTL=128
Reply from 2001:3::2: bytes=32 time<1ms TTL=128
Ping statistics for 2001:3::2: 
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: 
    Minimum = 0ms, Maximum = 0ms, Average = 0ms 

Step 3: Configure the IPv6 static Null0 interface route.

#Configure Device1.

Device1(config)#ipv6 route 2001:3::2/128 null0

Step 4: Check the result.

#Query the IPv6 route table of Device1.

Device1#show ipv6 route 
Codes: C - Connected, L - Local, S - static, R - RIP, B - BGP, i-ISIS 
       U - Per-user Static route 
       O - OSPF, OE-OSPF External, M - Management 
 
S ::/0 [1/10] 
     via 2001:1::2, 00:04:55, gigabitethernet0/2/1
L  ::1/128 [0/0] 
     via ::, 2w0d:03:36:10, lo0
C 2001:1::/64 [0/0] 
     via ::, 00:08:54, gigabitethernet0/2/1
L 2001:1::1/128 [0/0] 
     via ::, 00:08:53, lo0
C 2001:2::/64 [0/0] 
     via ::, 00:08:32, gigabitethernet0/2/0
L 2001:2::1/128 [0/0] 
     via ::, 00:08:30, lo0
S 2001:3::2/128 [1/1] 
     via ::, 00:00:34, null0 

In the Ipv6 route table, the IPv6 static Null0 interface route is added.

#On PC1, use the ping command to check the connectivity with PC2.

C:\Documents and Settings\Administrator>ping 2001:3::2 
Pinging 2001:3::2 with 32 bytes of data:
Request timed out. 
Request timed out.
Request timed out.
Request timed out. 
Ping statistics for 2001:3::2: 
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), 

After searching for the route table for the ICMP packet sent by PC1 on Device1, discover that the egress interface is Null0, and directly drop. Therefore, PC1 cannot communicate with PC2.

note


  • The static Null0 interface route is one special route, and the packets sent to the Null0 interface are all dropped. Therefore, configuring the static Null0 interface route can realize the filtering for the packets.