Categories
CCNP Enterprise Core (350-401) Cisco Packet Forwarding

IP Address Assignment

TCP/IP is the standard protocol for most networks. To begin with it was used with IPv4 (Internet Protocol Version 4) and it’s 32-bit IP addressing.

IPv4s public IP address pool over the years has become exhausted with no longer any fresh spare IP addressing space to be given out. Options to get IPv4 address space is by reselling or via an IP address space auction.

The exhaustion of the IPv4 public address space was foreseen and in 1998 IPv6 was developed to provide 128-bits of addressing space – much more than the 32-bits IPv4 provided.

Technologies are available which permit IPv4 and IPv6 networks to communicate with each other but do need to be assigned to device interfaces to route network packets for their particular version.

To assign an IPv4 address to an interface the interface configuration command ip address X.X.X.X Y.Y.Y.Y can be used (X being the network address and Y being the subnet mask).

An IPv6 address can be assigned to an interface in interface configuation mode with the command ipv6 address ipv6-address/prefix-length. Multiple IPv6 addresses can be added to the same interface by repeating the same command.

To assign an additional IPv4 address to an interface, add the prefix of secondary to the end of the ip address X.X.X.X Y.Y.Y.Y command like so:

ip address x.x.x.x y.y.y.y secondary

If the secondary keyword is not included or missed it will overwrite the existing IPv4 configuration on that interface.

An interface that is configured with an IP address and is in an ‘up’ state will insert the associated subnet into the routers routing table (The Routing Information Base or RIB).

Directly connected networks to the router have an Administrative Distance of 0; meaning it is impossible for any other routing protocol to have preference over a directly connected route.

Routed Subinterfaces (Router on a Stick)

There might be instances in a network setup where multiple VLANs require routing but there are not enough physical ports to accomdate all of the VLANs on the network.

This issue can be overcome by configured subinterfaces on the router, and setting a single port of the switches uplink to the router as a trunk and passing all those VLANs that require routing.

A sub-interface can be created on a router by adding a full stop after the interface number and an additional numeric value:

Interface GigabitEthernet0/0.100
! Subinterface for VLAN 10
encapsulation dot1q 10

Interface GigabitEthernet0/0.101
! Subinterface for VLAN 20
encapsulation dot1q 20

The code example above creates two sub interfaces 100 and 101, and sets them to use VLAN 10 and VLAN 20 respectively.

Switched Virtual Interfaces (SVI)

Catalyst switches have the ability to be assigned an IP address to a switched virtual interface, commonly known as a VLAN interface. The Switched Virtual Interface is configured by defining the VLAN on the switch and then defining the VLAN interface with the command interface vlan x, x being the VLAN ID.

In order for the switched virtual interface to reach an up / online state, it must have an interface associated with the VLAN that is also in an up / online state.

If the switch has multi-layer capabilities, it can be used for routiong packets between VLANs without the use of an external router.

SW(config)# vlan 10
SW(config-vlan)# exit
SW(config)# interface vlan 10
SW(config-if)# ip address 192.168.1.254 255.255.255.0

Routed Switch Ports

A multilayer switch port in some cases can be coverted from one that supports VLANs to just a stand-alone interface with an IP address attached to it – similar to a port located on a router.

SW(config)# Interface GigabitEthernet1/1
SW(config-if)# no switchport
SW(config-if)# ip address 192.168.1.254 255.255.255.0
SW(config-if)# no shutdown

Entering the command no switchport will remove standard VLAN switch capabilities from the port and convert it to a routed port. Entering the command switchport on the same interface will restore it to its original setting.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.