Tuesday, May 10, 2011

DHCP configuration

Given a scenario of auto-assigning the range of address 192.168.30.0/24 to your host and to reserve the first 10 ip of the range to your static devices such as servers, printers, routers' interfaces etc ... ...


ip dhcp excluded-address 192.168.30.1 192.168.30.10  => tell dhcp server no to assign 1st 10 address


ip dhcp pool TEST  => create a TEST pool to start assigning address
network 192.168.30.0 255.255.255.0  
=> range of address to assign, will check with excluded-address to start the ip assignment
default-router 192.168.30.1  => define the default gateway to be used by PC
dns-server 192.168.30.10  => define the dns server to be used for resolving URL to IP address




For Voice configuration support
option 150 ip 192.168.30.1  => assuming CME installed on the router


Why option 150?
Cisco phones require access to a TFTP server that contains device configuration name files (.cnf file format), which enables the device to communicate with Cisco Call Manager. 

Cisco IP Phones download their configuration from a TFTP server. When a Cisco IP Phone starts, if it does not have both the IP address and TFTP server IP address pre configured, it sends a request with option 150 to the DHCP server to obtain this information.



DHCP Option 150 is Cisco proprietary. The IEEE standard that matches with this requirement is Option 66. Like option 150, option 66 is used to specify the Name of the TFTP server.


Option 66 is an open standard juniper supports it. RFC 2132 defines option 66.

Difference between option 150 and option 66


  • DHCP option 150 supports a list of TFTP servers (Multiple Server IPs)
  • DHCP option 66 only supports the IP address or the hostname of a single TFTP server.

Thursday, February 10, 2011

Inter-VLAN routing


Traditional Inter-VLAN
- Separate links are needed for individual VLANs. In the example above, VLAN 10 and VLAN 20 are created. Thus 2 separate fastethernet links are needed to connected to the router.

Configuration on Router2
interface fa0/0
ip address 192.168.10.1 255.255.255.128
no shut
interface fa0/1
ip address 192.168.10.129 255.255.255.128
no shut

Configuration on Switch
=> connection to PC4
interface fa0/10
switchport access vlan 10

=> connection to PC5
interface fa0/20
switchport access vlan 20

=> connection to router2 interface fa0/0
interface fa0/23
switchport access vlan 10

=> connection to router2 interface fa0/1
interface fa0/24
switchport access vlan 20

Router-on-a-stick
- No separate links are needed for individual VLANs. Sub-interfaces are created to connect the Vlans, but ports on switch will need to be set to trunk mode in order for multiple vlans to pass through.

Configuration on Router0
interface fa0/0
no shut
=>good practice to set the sub-interface number to be same as the VLAN id for ease of identification
interface fa0/0.10
encapsulation dot1q 10
ip address 192.168.20.1 255.255.255.128
no shut
interface fa0/1.20
encapsulation dot1q 10
ip address 192.168.20.129 255.255.255.128
no shut

Configuration on Switch
Set the interface connecting to the end device such as client PC to be on the respective VLAN
switchport access vlan 10

Set the interface connecting to another intermediary device such as Router or Switch  to be on Trunk mode to enable multiple VLANs to pass through.
switchport mode trunk

**Make sure all the VLAN are created on all the switch if VLAN Trunking Protocol are not configured

Switch-based Inter-VLAN (L3 switch)
- Layer 3 switch allowed one to use the switch as a Layer 3 device to route traffic between different VLANs

Configuration on Multilayer Switch
ip routing  => to enable L3 function routing on switch
interface VLAN 10   => gateway for VLAN 10
ip address 192.168.30.1 255.255.255.128
no shut
interface VLAN 20   => gateway for VLAN 20
ip address 192.168.30.129 255.255.255.128
no shut
interface fa0/1   => connected to switch for VLAN 10
switchport access vlan 10

interface fa0/2   => connected to switch for VLAN 20
switchport access vlan 20


Configuration on Switch
Set the interface connecting to the device to be on the respective VLAN
switchport access vlan 10








Thursday, December 16, 2010

IPv6 Subnetting

An ISP is normally allocated a /32 block.
In Singapore, One of the block issued to Singtel is 2001:0C20::/32

|                  n bits           |       m bits   |            128-n-m bits      |
+-----------------------------+---------------+-------------------------------+
|    global routing prefix | subnet ID   |          interface ID          |
+-----------------------------+---------------+-------------------------------+
An organization is often allocated a /48 block of IPv6 address space.
Let's use 2001:0C20:A::/48 10th group in the subnet assigned to ISP

The remaining 16 bits of the first half 64 bits will give 65536 /64s

Let's use 0000 for loopback address

2001:0C20:A:0000:0000:0000:0000:0000/64

Router Loopback Addresses
Router loopback addresses are /128 bit host routes
2001:0C20:A:0000:0000:0000:0000:0000/64

Each router loopback address is indicated by its Router # (y):
2001:0C20:A:0000:0000:0000:0000:0001/128
2001:0C20:A:0000:0000:0000:0000:0002/128
2001:0C20:A:0000:0000:0000:0000:FFFE/128
2001:0C20:A:0000:0000:0000:0000:FFFF/128

Point-to-Point Addresses 
Point-to-Point are links between only two nodes. 
For such networks, we could use one specific set of networks allocated 
from the prefix 2001:0C20:A:F000:0000:0000:0000:0000/52

Examples of possible Point to Point subnets:
Point-to-Point Link 1
2001:0C20:A:F001:0000:0000:0000:0001/64 
2001:0C20:A:F001:0000:0000:0000:0002/64 
...
Point-to-Point Link 10 
2001:0C20:A:F00A:0000:0000:0000:0001/64 
2001:0C20:A:F00A:0000:0000:0000:0002/64 

Server, Printers Subnet Assignment (Static IP)
For such networks, we could use one specific set of networks allocated from the prefix 2001:0C20:A:E000:0000:0000:0000:0000/52 

These are examples of possible server subnets: 
2001:0C20:A:E001:0000:0000:0000:0000/64  
2001:0C20:A:E002:0000:0000:0000:0000/64 
... 
2001:0C20:A:EFFE:0000:0000:0000:0000/64 
2001:0C20:A:EFFF:0000:0000:0000:0000/64 

General End-Node Subnets 
There are a a few ways you could subnet your end node subnets:  
|          n bits (48)           | b(8) | s(8)  |    128-b-s bits (64)    | 
+-----------------------------+--------------+----------------------------+ 
| global routing prefix    | bldg | Lvl   |         interface ID        | 
+-----------------------------+--------------+----------------------------+ 
OR  
|          n bits (48)           |      v(16)       |      128-v bits (64)     | 
+-----------------------------+----------------+----------------------------+ 
|  global routing prefix   |   VLAN ID   |        interface ID         | 
+-----------------------------+----------------+----------------------------+ 

Building addresses are summarized as: 2001:0C20:A:bb00:0000:0000:0000:0000/56 
Level addresses are: 2001:0C20:A:bbll:0000:0000:0000:0000/64 

Therefore, Building 45, Level 7 would be: 2001:0C20:A:4507::/64

Thursday, October 14, 2010

IPv6 Type of Address



A)Link-Local (FE80::/10)
When an IPv6 stack is enabled, link-local address is automatically assigned to each interface. The IPv6 link-local prefix FE80::/10 is used and the interface identifier in Extended Unique Identifier 64 (EUI-64) format is appended as the address's low-order 64-bit. Link-local addresses are only for local-link scope and must never be routed between subnets within a site.






Example
RouterA(config-if)#ipv6 address FE80:0:0:0:1001:1234:5678:00AB link-local
The link-local address is configured here. This command with the link-local argument can be used to override the default link-local address assigned by the router.






You can also enable just IPv6 on an interface without specifying an aggregatable global unicast or site-local address by using the ipv6 enable command, as shown here:
Router(config-if)#ipv6 enable
This command also automatically configures the link-local address on the interface.


B)Site-Local (FEC0::/10) - Deprecated in RFC 3879 and replaced with Unique Local IPv6 Unicast Addresses fc00::/7 - RFC 4193, fd00::/8 localli assigned ULA


A site-local address is used only within a site. Site-local addresses are not enabled by default on nodes like link-local addresses, meaning that they must be assigned.
A site-local address is similar to private address spaces in IPv4. A site-local prefix and address may be assigned to any nodes and routers within a site. However, site-local addresses must never be routed on the global IPv6 Internet.


Usage:Printers,Intranet servers, Network switches, bridges, gateways, wireless access points and any servers and routers that must only be reached internally for management purposes



Example
RouterA(config-if)#ipv6 address FEC0:0:0:1001::1/64
The site-local address is configured on the interface. After the completion of this command, the link-local address is automatically configured.



In the following example, the site-local prefix FEC0:0:0:1001::/64 is used to configure the address. The site-local and link-local addresses are automatically configured:
RouterA(config-if)#ipv6 address FEC0:0:0:1::/64 eui-64


***Take note that the Site-local will appear under the Global Unicast Address field same as Aggregate Global Unicast Address, the only way to know that it is site-local is by the first 4 hexadecimal value FEC0.


C)Aggregatable Global Unicast Address


Each global unicast IPv6 address has three parts:


  • Prefix received from a provider— The prefix assigned to an organization by a provider should be at least a /48 prefix. The /48 prefix represents the high-order 48-bit of the network prefix. 
  • Site— With one /48 prefix allocated to an organization by a provider, it is possible for that organization to enable up to 65,535 subnets (assignment of 64-bit's prefix to subnets). 
  • Host— The host part uses each node's interface identifier. This part of the IPv6 address, which represents the address's low-order 64-bit, is called the interface ID.
Example
RouterA(config-if)#ipv6 address 2001:0c20:0:1001:0:0:0:1abc/64
The aggregatable global unicast address is configured on the interface. After the completion of this command, the link-local address is automatically configured.

In the following example, the aggregatable global unicast prefix 2001:0c20:0:1001::/64 is used to configure the address. The aggregatable global unicast and link-local addresses are automatically configured:
RouterA(config-if)#ipv6 address 2001:0c20:0:1001::/64 eui-64










Friday, July 23, 2010

RIP configuration

router rip
network
=>enable routing protocol RIP version 1 (classful, same subnet used throughout whole network)
=> routing table send out thru broadcast address 255.255.255.255


router rip
version 2
network
=>enable routing protocol RIP version 2 (classless, able to used different subnet VLSM)
=> routing table send out thru multicast address 224.0.0.9, UDP Port number 520
no auto-summary => no auto summarization
default-information originate => generate a default route into RIP
passive-interface fa0/0 => prevent routing update out thru interface fa0/0

Load Balancing
maximum-paths
=> default 4, maximum 6
=> IOS version 12.3 onwards up to 16

By default, RIP uses broadcast or multicast to push out routing table. If there's a need, we can push update using unicast neighbor 



Juniper
R2#set protocol rip group RIPGROUP2 neighbor em2.0
R3#set protocol rip group RIPGROUP3 neighbor em2.0

Group name is local significant

Be default Junos dont advertise route, need to create a policy
R2#set policy-options policy-statement RPOLICY term 1 from protocol rip
R2#set policy-options policy-statement RPOLICY term 1 from protocol direct
R2#set policy-options policy-statement RPOLICY term 1 then accept
R2#set protocol rip group RIPGROUP2 export RPOLICY

R3#set policy-options policy-statement RPOLICY term 1 from protocol rip
R3#set policy-options policy-statement RPOLICY term 1 from protocol direct
R3#set policy-options policy-statement RPOLICY term 1 then accept
R3#set protocol rip group RIPGROUP3 export RPOLICY

show route