In order to address the
IPv6-oriented configuration of a router in a simple way, we will see in this
article how to configure a router using IPv6 addressing and how to configure IPv6 Static Route.
How to configure IPv6 Static Route:
Topology:
Nothing very complicated. We have
here two routers, each with a LAN (here simulated by a loopback interface). The
aim is to allow the LAN of R1 to communicate with the LAN of R2.
We will then have to define the IPv6
addressing of the interfaces, and then define the static routing on R1 and R2.
Configuring
R1 interfaces:
Let's start by configuring the
loopback interface that simulates the LAN of R1. Who will receive the first
address of the network 2001: ABCD: 0001 :: / 48 ... i.e. 2001: ABCD: 0001:
0000: 0000: 0000: 0001 that can be written in abbreviated form 2001: ABCD: 1 ::
1
R1>
enable
R1 # configure terminal
R1 (config) #interface loopback 0
R1 (config-if) #description LAN R1
R1 (config-if) # ipv6
address 2001: ABCD: 1 :: 1/48
R1 (config-if) #exit
R1 (config) #
Now configure the Serial 0/0
interface of R1 that binds it to R2. It will be configured according to the
EUI-64 standard. This means that the last 64 bits of the IPv6 address will be
automatically set. Just give the network address and specify the eui-64 format.
The last 64 bits are normally
assigned according to the MAC address of an Ethernet interface, however, here
we configure a serial interface which of course has no MAC address. The router
will then complete the IPv6 address by using the MAC address of an Ethernet
interface present on the router.
R1
(config) #interface serial 0/0
R1 (config-if) #clock rate 4000000
R1 (config-if) # ipv6
address 2001: ABCD:: / 48 eui-64
R1 (config-if) #no shutdown
R1 (config-if) #exit
R1 (config) #
Let's see the result...
R1 #
show ipv6 serial interface 0/0
Serial0 / 0 is up, line protocol is down
IPv6 is enabled, link-local address is FE80 ::
C200: AFF: FE78: 0 [TEN]
No Virtual link-local address (es):
Global unicast address (es):
2001: ABCD ::
C200: AFF: FE78: 0 , subnet is 2001: ABCD :: / 48 [EUI / TEN]
Joined group address (es):
FF02 :: 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
R1 #
The interface now has the global
IPv6 address 2001: ABCD :: C200: AFF: FE78: 0
... remains to understand where it comes from. To do this, let's analyze the
MAC address of the FastEthernet interface that the router used to generate the
address in question ...
R1 #
show interfaces fastEthernet 0/0 | Include Hardware
Hardware is Gt96k FE, address is c000.0a78.0000 (bia c000.0a78.0000)
R1 #
Here's how the router dialed the
address:
- The 64 first bits are defined by the network address, and if necessary supplemented by 0. Either: 2001: ABCD: 0000: 0000 ...... ..
- The last 64 bits are composed of the MAC address (borrowed from a FastEthernet interface), inserting the hexadecimal value FFFE in the middle of it to go from 48 bits (format of the MAC address) to the 64 bits required ... : 2001: ABCD: 0000: 0000: C000 : 0A FF : FE 78 : 0000
- Last step, the 7th bit of the MAC address is set to 1, so we go from C000.0A78.0000 to C200.00A78.0000, which finally gives us the address 2001: ABCD: 0000: 0000: C200: 0AFF: FE78: 0000 which can be written more simply 2001: ABCD :: C200: AFF: FE78: 0
Now you have to configure R2 ...
Configuring
R2:
R2>
enable
R2 # configure terminal
R2 (config) #interface loopback 0
R2 (config-if) # ipv6 address 2001: ABCD: 2 ::
1/48
R2 (config-if) #exit
R2 (config) #interface serial 0/0
R2 (config-if) # ipv6 address 2001: ABCD :: /
48 eui-64
R2 (config-if) #no shutdown
R2 (config-if) #exit
R2 (config) #exit
R2 #
Let's test the connectivity between
R1 and R2 ...
For this we start by finding the
IPv6 address of the serial interface of R2 ...
R2 #
show ipv6 interface brief
FastEthernet0 / 0 [administratively down /
down]
Serial0 / 0 [up / up]
FE80
:: C201: AFF: FE78: 0
2001 :: ABCD C201: AFF: FE78: 0
FastEthernet0 / 1 [administratively down /
down]
Serial0 / 1 [administratively down / down]
Loopback0 [up / up]
FE80 :: C201: AFF: FE78: 0
2001 ABCD: 2 :: 1
R2 #
Let's now use the ping command in
ipv6 to test that the link between R1 and R2 works ...
R1 #
ping ipv6 2001: ABCD :: C201: AFF: FE78: 0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001: ABCD
:: C201: AFF: FE78: 0, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip
min / avg / max = 0/12/36 ms
R1 #
OK, everything looks fine, let's
move on to defining static routes.
Defining
static routes:
In order for the LAN of R1 to
communicate with the LAN of R2, we must define a route on R1 that indicates the
next hop to reach the LAN of R2, ... and ... on R2 a route that indicates
Next-hop to reach LAN of R1.
But first of all ... you need to
enable IPv6 routing! Otherwise, the router would behave like a simple IPv6
machine, capable of sending or receiving traffic but not router!
On
R1:
R1
(config) # ipv6 unicast-routing
R1 (config) # ipv6 route 2001: ABCD: 2 :: / 48
2001: ABCD :: C201: AFF: FE78: 0
On
R2 :
R2
(config) # ipv6 unicast-routing
R2 (config) # ipv6 route 2001: ABCD: 1 :: / 48
2001: ABCD :: C200: AFF: FE78: 0
Verification:
Let's take a look at the R1 routing
table
R1#show ipv6 route
IPv6
Routing Table - 6 entries
Codes:
C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route, M - MIPv6
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS
summary
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 - EIGRP, EX - EIGRP external
C
2001:ABCD::/48 [0/0]
via ::, Serial0/0
L
2001:ABCD::C200:AFF:FE78:0/128 [0/0]
via ::, Serial0/0
C
2001:ABCD:1::/48 [0/0]
via ::, Loopback0
L
2001:ABCD:1::1/128 [0/0]
via ::, Loopback0
S 2001:ABCD:2::/48 [1/0]
via 2001:ABCD::C201:AFF:FE78:0
L
FF00::/8 [0/0]
via ::, Null0
R1#
The road creates is present. Let's test
connectivity, by launching an ipv6 ping, from the Loopback interface of R1 to
the Loopback interface of R2.
R1 #
ping
Protocol [ip]: ipv6
Target IPv6 address: 2001: ABCD: 2 :: 1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands? [No]: yes
Source address or interface: 2001: ABCD: 1 :: 1
UDP protocol? [No]:
Verbose? [No]:
Precedence [0]:
DSCP [0]:
Include hop by hop option? [No]:
Include destination option? [No]:
Sweep range of sizes? [No]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001: ABCD:
2 :: 1, timeout is 2 seconds:
Packet feeds with a source address of 2001:
ABCD: 1 :: 1
!!!!!
Success rate is 100 percent (5/5), round-trip
min / avg / max = 0/10/40 ms
R1 #
Everything seems to be in order!
0 comments:
Post a Comment