29 févr. 2012

BGP & Tunneling

R1 is in AS1, R5 in AS5.
R2, R3 and R4 are in AS234.

R1 has an eBGP session with R2.
R5 has an eBGP session with R4.

EIGRP is configured inside AS234.
To allow R1 Loopback0 to reach R5 Loopback0, we must establish an iBGP session between R2 ans R4.

We will use a GRE Tunnel between R2 and R4:


R1:
!
hostname r1
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Serial1/0
 ip address 10.150.12.1 255.255.255.0
!
router bgp 1
 no synchronization
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
 network 1.1.1.1 mask 255.255.255.255
 neighbor 10.150.12.2 remote-as 234
 no auto-summary
!
ip route 0.0.0.0 0.0.0.0 10.150.12.2
!

On R5:

!
hostname r5
!
interface Loopback0
 ip address 5.5.5.5 255.255.255.255
!
interface Serial1/0
 ip address 10.150.45.5 255.255.255.0
!
router bgp 5
 no synchronization
 bgp router-id 5.5.5.5
 bgp log-neighbor-changes
 network 5.5.5.5 mask 255.255.255.255
 neighbor 10.150.45.4 remote-as 234
 no auto-summary
!
ip route 0.0.0.0 0.0.0.0 10.150.45.4
!


On R3:

!
hostname r3
!
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface Serial1/0
 ip address 10.150.23.3 255.255.255.0
!
interface Serial1/1
 ip address 10.150.34.3 255.255.255.0
!
router eigrp 1
 network 3.3.3.3 0.0.0.0
 network 10.150.23.3 0.0.0.0
 network 10.150.34.3 0.0.0.0
 no auto-summary
 eigrp router-id 3.3.3.3
!

On R2:

!
hostname r2
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface Tunnel0
 ip address 10.150.24.2 255.255.255.0
 tunnel source 2.2.2.2
 tunnel destination 4.4.4.4
!
interface Serial1/0
 ip address 10.150.12.2 255.255.255.0
!
interface Serial1/1
 ip address 10.150.23.2 255.255.255.0
!
router eigrp 1
 network 2.2.2.2 0.0.0.0
 network 10.150.23.2 0.0.0.0
 no auto-summary
 eigrp router-id 2.2.2.2
!
router bgp 234
 no synchronization
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 neighbor 10.150.12.1 remote-as 1
 neighbor 10.150.24.4 remote-as 234
 neighbor 10.150.24.4 update-source Tunnel0
 neighbor 10.150.24.4 next-hop-self
 no auto-summary
!

On R4:

!
hostname r4
!
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface Tunnel0
 ip address 10.150.24.4 255.255.255.0
 tunnel source 4.4.4.4
 tunnel destination 2.2.2.2
!
interface Serial1/0
 ip address 10.150.34.4 255.255.255.0
!
interface Serial1/1
 ip address 10.150.45.4 255.255.255.0
!
router eigrp 1
 network 4.4.4.4 0.0.0.0
 network 10.150.34.4 0.0.0.0
 no auto-summary
 eigrp router-id 4.4.4.4
!
router bgp 234
 no synchronization
 bgp router-id 4.4.4.4
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 234
 neighbor 2.2.2.2 shutdown
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 10.150.24.2 remote-as 234
 neighbor 10.150.24.2 update-source Tunnel0
 neighbor 10.150.24.2 next-hop-self
 neighbor 10.150.45.5 remote-as 5
 no auto-summary
!


We have the same result by establishing a session between R2 and R4 Loopback0...




BGP - Synchronization


Synchronization

bgp-toc16.gif
Before the discussion of synchronization, look at this scenario. RTC in AS300 sends updates about 170.10.0.0. RTA and RTB run iBGP, so RTB gets the update and is able to reach 170.10.0.0 via next hop 2.2.2.1. Remember that the next hop is carried via iBGP. In order to reach the next hop, RTB must send the traffic to RTE.
Assume that RTA has not redistributed network 170.10.0.0 into IGP. At this point, RTE has no idea that 170.10.0.0 even exists.
If RTB starts to advertise to AS400 that RTB can reach 170.10.0.0, traffic that comes from RTD to RTB with destination 170.10.0.0 flows in and drops at RTE.
Synchronization states that, if your AS passes traffic from another AS to a third AS, BGP should not advertise a route before all the routers in your AS have learned about the route via IGP. BGP waits until IGP has propagated the route within the AS. Then, BGP advertises the route to external peers.
In the example in this section, RTB waits to hear about 170.10.0.0 via IGP. Then, RTB starts to send the update to RTD. You can make RTB think that IGP has propagated the information if you add a static route in RTB that points to 170.10.0.0. Make sure that other routers can reach 170.10.0.0.

Disable Synchronization

In some cases, you do not need synchronization. If you do not pass traffic from a different AS through your AS, you can disable synchronization. You can also disable synchronization if all routers in your AS run BGP. The disablement of this feature can allow you to carry fewer routes in your IGP and allow BGP to converge more quickly.
The disablement of synchronization is not automatic. If all your routers in the AS run BGP and you do not run IGP at all, the router has no way to know. Your router waits indefinitely for an IGP update about a certain route before the router sends the route to external peers. You have to disable synchronization manually in this case so that routing can work correctly:
router bgp 100 
no synchronization
Note: Make sure that you issue the clear ip bgp address command to reset the session.
bgp-toc17.gif
RTB# 
router bgp 100 
network 150.10.0.0 
neighbor 1.1.1.2 remote-as 400 
neighbor 3.3.3.3 remote-as 100 
no synchronization 

!--- RTB puts 170.10.0.0 in its IP routing table and advertises the network
!--- to RTD, even if RTB does not have an IGP path to 170.10.0.0.

RTD# 
router bgp 400 
neighbor 1.1.1.1 remote-as 100 
network 175.10.0.0 

RTA# 
   router bgp 100 
   network 150.10.0.0 
   neighbor 3.3.3.4 remote-as 100

27 févr. 2012

IPv6 - Frame-Relay #1

There is no Frame-Relay inarp mechanism for IPv6 in IOS.
We must use static l3 to l2 mapping:


!
hostname r1
!

interface Serial1/0
 no ip address
 encapsulation frame-relay
 ipv6 address 2001:CC1E::/64 eui-64
 ipv6 enable
 serial restart-delay 0
!


Gives us the IPv6 address:



r1#sh ipv6 interface brief s1/0
Serial1/0                  [up/up]
    FE80::C800:32FF:FE45:0
    2001:CC1E::C800:32FF:FE45:0
!


On r2:

!
hostname r2
!

interface Serial1/0
 no ip address
 encapsulation frame-relay
 ipv6 address 2001:CC1E::/64 eui-64
 ipv6 enable
 serial restart-delay 0
!


Gives us the IPv6 address:

r2#sh ipv6 interface brief s1/0
Serial1/0                  [up/up]
    FE80::C801:32FF:FE45:0
    2001:CC1E::C801:32FF:FE45:0
!




Now, we can configure the mapping:


On r1:

!
interface Serial1/0
 frame-relay map ipv6 2001:CC1E::C801:32FF:FE45:0 102
!
r1#show frame-relay map
Serial1/0 (up): ipv6 2001:CC1E::C801:32FF:FE45:0 dlci 102(0x66,0x1860), static,
              CISCO, status defined, active


And, on r2:
!
interface Serial1/0

 frame-relay map ipv6 2001:CC1E::C800:32FF:FE45:0 102

!
r2#show frame-relay map 
Serial1/0 (up): ipv6 2001:CC1E::C800:32FF:FE45:0 dlci 201(0xC9,0x3090), static,
              CISCO, status defined, active


It works:
r1#ping ipv6 2001:CC1E::C801:32FF:FE45:0 source 2001:CC1E::C800:32FF:FE45:0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:CC1E::C801:32FF:FE45:0, timeout is 2 seconds:
Packet sent with a source address of 2001:CC1E::C800:32FF:FE45:0
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/16/24 ms
r1#
And:
r2#ping ipv6 2001:CC1E::C800:32FF:FE45:0 source 2001:CC1E::C801:32FF:FE45:0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:CC1E::C800:32FF:FE45:0, timeout is 2 seconds:
Packet sent with a source address of 2001:CC1E::C801:32FF:FE45:0
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/16/24 ms
r2#


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


IPv6 with point to point subifs works the same way.
Just specify the dlci (frame-relay interface-dlci 201 on r2, 102 on r1).



24 févr. 2012

Policy Routing w/ Tracking objects

Reliable Policy Routing
R5 has two loopbacks, 5.5.5.5/32 and 55.55.55.55/32
Configure policy routing on r2 so that:
 - to reach 5.5.5.5/32 packets from r1 must go to r3.
 - to reach 55.55.55.55/32 packets from r1 must go to r4.
 - do not use static routing on r2 (excepted to reach r1).

Use reliable routing to do this:
 - if r3 is not reachable, packets to 5.5.5.5/32 must go through r4.
 - if r4 is not reachable, packets to 55.55.55.55/32 must go through r3.

Verify using traceroute.

r1 configuration:
!
hostname r1
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Serial1/0
 ip address 192.168.12.1 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 192.168.12.2
!

r2 configuration:
!
hostname r2
!
track 5 ip sla 10
!
track 55 ip sla 15
!
interface Serial1/0
 ip address 192.168.12.2 255.255.255.0
 ip policy route-map PBR
!
interface Serial1/1
 ip address 192.168.23.2 255.255.255.0
 serial restart-delay 0
!
interface Serial1/2
 ip address 192.168.24.2 255.255.255.0
!
ip route 1.1.1.1 255.255.255.255 192.168.12.1
!
ip sla 10
 icmp-echo 192.168.23.3 source-interface Serial1/1
 timeout 1000
 threshold 1000
 frequency 2
ip sla schedule 10 life forever start-time now
ip sla 15
 icmp-echo 192.168.24.4 source-interface Serial1/2
 timeout 1000
 threshold 1000
 frequency 2
ip sla schedule 15 life forever start-time now
access-list 105 permit ip any host 5.5.5.5
access-list 155 permit ip any host 55.55.55.55
!
route-map PBR permit 10
 match ip address 105
 set ip next-hop verify-availability 192.168.23.3 1 track 5
 set ip default next-hop 192.168.24.4
!
route-map PBR permit 20
 match ip address 155
 set ip next-hop verify-availability 192.168.24.4 1 track 55
 set ip default next-hop 192.168.23.3
!



r3 configuration:
!
hostname r3
!
interface Serial1/0
 ip address 192.168.23.3 255.255.255.0
!
interface Serial1/1
 ip address 192.168.35.3 255.255.255.0
!
ip route 1.1.1.1 255.255.255.255 192.168.23.2
ip route 5.5.5.5 255.255.255.255 192.168.35.5
ip route 55.55.55.55 255.255.255.255 192.168.35.5
!



r4 configration:
!
hostname r4
!
interface Serial1/0
 ip address 192.168.24.4 255.255.255.0
!
interface Serial1/1
 ip address 192.168.45.4 255.255.255.0
!
ip route 1.1.1.1 255.255.255.255 192.168.24.2
ip route 5.5.5.5 255.255.255.255 192.168.45.5
ip route 55.55.55.55 255.255.255.255 192.168.45.5
!



r5 configuration:
!
hostname r5
!
interface Loopback0
 ip address 5.5.5.5 255.255.255.255
!
interface Loopback1
 ip address 55.55.55.55 255.255.255.255
!
interface Serial1/0
 ip address 192.168.35.5 255.255.255.0
!
interface Serial1/1
 ip address 192.168.45.5 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 192.168.45.4
!



Verifications:
r1#traceroute 5.5.5.5 source 1.1.1.1    

Type escape sequence to abort.
Tracing the route to 5.5.5.5

  1 192.168.12.2 8 msec 24 msec 20 msec
  2 192.168.23.3 20 msec 44 msec 44 msec
  3 192.168.35.5 76 msec *  64 msec

r1#traceroute 55.55.55.55 source 1.1.1.1

Type escape sequence to abort.
Tracing the route to 55.55.55.55

  1 192.168.12.2 24 msec 20 msec 20 msec
  2 192.168.24.4 20 msec 44 msec 40 msec
  3 192.168.45.5 80 msec *  76 msec


Now, on r3, remove IP address 192.168.23.3:
On r2, you see :
Feb 23 01:06:28.127: %TRACKING-5-STATE: 5 ip sla 10 state Up->Down

r1#traceroute 5.5.5.5 source 1.1.1.1

Type escape sequence to abort.
Tracing the route to 5.5.5.5

  1 192.168.12.2 16 msec 24 msec 20 msec
  2 192.168.24.4 24 msec 36 msec 44 msec
  3 192.168.45.5 76 msec *  72 msec
r1#traceroute 55.55.55.55 source 1.1.1.1

Type escape sequence to abort.
Tracing the route to 55.55.55.55

  1 192.168.12.2 24 msec 20 msec 24 msec
  2 192.168.24.4 36 msec 24 msec 44 msec
  3 192.168.45.5 76 msec *  76 msec


Note:
If you remove IP 192.168.24.4 on r4, configure the default route in r5 via r3...

On r3, add IP address 192.168.23.3:
On r2, you see:
Feb 23 01:10:18.127: %TRACKING-5-STATE: 5 ip sla 10 state Down->Up

r1#traceroute 5.5.5.5 source 1.1.1.1    

Type escape sequence to abort.
Tracing the route to 5.5.5.5

  1 192.168.12.2 28 msec 16 msec 24 msec
  2 192.168.23.3 24 msec 40 msec 40 msec
  3 192.168.35.5 80 msec *  64 msec

r1#traceroute 55.55.55.55 source 1.1.1.1

Type escape sequence to abort.
Tracing the route to 55.55.55.55

  1 192.168.12.2 20 msec 20 msec 24 msec
  2 192.168.24.4 16 msec 44 msec 44 msec
  3 192.168.45.5 56 msec *  40 msec






19 févr. 2012

Backup using Backup Interfaces

R1 is connected to R2 via 2 links, one of the two links will be active if the first on goes down:



!
hostname r1
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet1/0
 ip address 192.168.12.1 255.255.255.0
!

interface FastEthernet2/0
 backup delay 3 60
 backup interface FastEthernet1/0
 ip address 192.168.112.1 255.255.255.0
!
ip route 2.2.2.2 255.255.255.255 192.168.12.2
ip route 2.2.2.2 255.255.255.255 192.168.112.2
!

!
hostname r2
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet1/0
 ip address 192.168.12.2 255.255.255.0
!
interface FastEthernet2/0
 ip address 192.168.112.2 255.255.255.0
!
ip route 1.1.1.1 255.255.255.255 192.168.12.1
ip route 1.1.1.1 255.255.255.255 192.168.112.1
!


FastEthernet2/0: 
Backup interface FastEthernet1/0, failure delay 3 sec, secondary disable delay 60 sec,


r1(config-if)#backup ?      
  active     Configure an interface as an active backup
  delay      Delays before backup line up or down transitions
  interface  Configure an interface as a backup
  load       Load thresholds for line up or down transitions

17 févr. 2012

Static Routing Backup with Tracking

Use ip sla + tracking object to check the next-hop availability.
If the next hop is not reachable, the static route disappears from the routing table, useful if there is a switch between the routers:

!
interface FastEthernet1/0.102
 encapsulation dot1Q 102
 ip address 192.168.12.2 255.255.255.0
!
track 5 ip sla 1 reachability
 default-state up
!
ip sla 1
 icmp-echo 192.168.12.1 source-ip 192.168.12.2
 timeout 900
 threshold 2
 frequency 3
ip sla schedule 1 life forever start-time now
!
ip route 1.1.1.1 255.255.255.255 192.168.12.1 name Bob track 5
!

1 févr. 2012

PPP#1 - Authentication

Client/Server authentication

"Client" side:
!
interface Serial1/0
 ip address 192.168.12.1 255.255.255.0
 encapsulation ppp
 ppp chap hostname ROUTER1
 ppp chap password 0 CISCO
!


Server side:
!
interface Serial1/0
 ip address 192.168.12.2 255.255.255.0
 encapsulation ppp
 ppp authentication chap callin
!
username ROUTER1 password CISCO
!

Same kind of configuration for pap:
"Client" side: 
!
interface Serial1/0
 ip address 192.168.12.1 255.255.255.0
 encapsulation ppp
 serial restart-delay 0
 ppp chap password 0 CISCO
 ppp pap sent-username ROUTER1 password 0 CISCO
!
Server side:
!
interface Serial1/0
 ip address 192.168.12.2 255.255.255.0
 encapsulation ppp
 serial restart-delay 0
 ppp authentication pap callin
end

Mutual Authentication (PAP & CHAP):
On r1:
!
interface Serial1/0
 ip address 192.168.12.1 255.255.255.0
 encapsulation ppp
 serial restart-delay 0
 ppp authentication pap chap
 ppp pap sent-username ROUTER1 password 0 CISCO
!
username ROUTER2 password CISCO
!

On r2:

!
interface Serial1/0
 ip address 192.168.12.1 255.255.255.0
 encapsulation ppp
 serial restart-delay 0
 ppp authentication pap chap
 ppp pap sent-username ROUTER2 password 0 CISCO
!

username ROUTER1 password CISCO
!

Don't forget ppp authentication pap chap cmd.

Debug with: debug ppp negotiation.


31 janv. 2012

HDLC#1 - Header Compression

Configure header on HDLC link:

R2(config)#interface serial1/0
R2(config-if)#compress ?
  stac  stac compression algorithm
 
R2(config-if)#compress stac
R2(config-if)#end
R2#


This is for header compression, not for data compression.
Must be configured on both sides.

25 janv. 2012

Reading-list#1


http://tools.ietf.org/html/rfc1661 - The Point-to-Point Protocol (PPP)
http://tools.ietf.org/html/rfc2153 - PPP Vendor Extensions
http://tools.ietf.org/html/rfc1994 - PPP Challenge Handshake Authentication Protocol (CHAP)
http://tools.ietf.org/html/rfc1334 - PPP Authentication Protocols
~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
http://tools.ietf.org/html/rfc2516 - A Method for Transmitting PPP Over Ethernet (PPPoE)
http://tools.ietf.org/html/rfc2684 - Multiprotocol Encapsulation over ATM Adaptation Layer 5
http://tools.ietf.org/html/rfc2131 - Dynamic Host Configuration Protocol
~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
http://tools.ietf.org/html/rfc2865 - RADIUS Remote Access Dial In User Service
http://tools.ietf.org/html/rfc2866 - RADIUS Accounting
~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
http://tools.ietf.org/html/rfc1321 - The MD5 Message-Digest Algorithm
~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
http://tools.ietf.org/html/rfc2661 - Layer Two Tunneling Protocol "L2TP"





14 janv. 2012

RFC1483 - DHCP Server & Relay

LAB#1:
BrAS
!
hostname BrAS
!
ip dhcp excluded-address 192.168.1.1
!
ip dhcp pool Pool-DHCP1
   network 192.168.1.0 255.255.255.0
   default-router 192.168.1.1
!
interface Loopback0
 ip address 192.168.1.1 255.255.255.0
!
interface FastEthernet1/0
 no ip address
 duplex auto
 speed auto
 no keepalive
!
interface FastEthernet1/0.203
 encapsulation dot1Q 203
 ip address 192.168.23.2 255.255.255.0

!
interface ATM2/0
 no ip address
 no atm ilmi-keepalive
!         
interface ATM2/0.1 point-to-point
 ip unnumbered Loopback4000
 atm route-bridged ip
 pvc 1/35 
  no broadcast
  encapsulation aal5snap
!
ip route 0.0.0.0 0.0.0.0 192.168.23.3 name GW1
!


CPE:
!
hostname CPE
!

interface FastEthernet1/0
 no shutdown
 no ip address
 duplex auto
 speed auto
 no keepalive
!

interface ATM2/0
 no ip address
 no atm ilmi-keepalive
!
interface ATM2/0.1 point-to-point
 ip address dhcp client-id FastEthernet1/0
 atm route-bridged ip
 pvc 1/35 
  broadcast
  encapsulation aal5snap
!        


GW1:

!
hostname GW1
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet1/0
 no ip address
 duplex auto
 speed auto
 no keepalive
!
interface FastEthernet1/0.203
 encapsulation dot1Q 203
 ip address 192.168.23.3 255.255.255.0
!
ip route 192.168.1.0 255.255.255.0 192.168.23.2 name GW1
!





LAB#2:


CPE1:


hostname CPE1
!
interface FastEthernet0/0
 mac-address aaaa.aaaa.aaaa
 no ip address
 duplex half
!
interface ATM1/0
 no ip address
 no atm ilmi-keepalive
!
interface ATM1/0.1 point-to-point
 ip address dhcp client-id FastEthernet0/0
 atm route-bridged ip
 pvc 1/41
  encapsulation aal5snap
 !
!


CPE2:


hostname CPE2
!
interface FastEthernet0/0
 mac-address aaaa.aaaa.aaab
 no ip address
 duplex half
!
interface ATM1/0
 no ip address
 no atm ilmi-keepalive
!
interface ATM1/0.1 point-to-point
 ip address dhcp client-id FastEthernet0/0
 atm route-bridged ip
 pvc 1/42 
  encapsulation aal5snap
 !
!

CPE3:
hostname CPE3
!
interface FastEthernet0/0
 mac-address aaaa.aaaa.aaac
 no ip address
 duplex half
!
interface ATM1/0
 no ip address
 no atm ilmi-keepalive
!
interface ATM1/0.1 point-to-point
 ip address dhcp client-id FastEthernet0/0
 atm route-bridged ip
 pvc 1/43
  encapsulation aal5snap
 !
!

BrAS:
hostname BrAS
!
interface Loopback0
 ip address 150.0.0.1 255.255.255.255
!
interface Loopback4000
 ip address 192.168.1.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 192.168.45.4 255.255.255.0
 duplex full
!
interface ATM1/0
 no ip address
 no atm ilmi-keepalive
!
interface ATM1/0.1 point-to-point
 ip unnumbered Loopback4000
 ip helper-address 150.0.0.50
 atm route-bridged ip
 range pvc 1/32 1/52
  encapsulation aal5snap
 !
!
ip route 0.0.0.0 0.0.0.0 192.168.45.5 name DHCPSrv-GW

DHCPSrv-GW:
hostname DHCPSrv-GW
!
ip dhcp pool DHCP1
   network 192.168.1.0 255.255.255.0
   default-router 192.168.1.1 
!
interface Loopback0
 ip address 150.0.0.50 255.255.255.255
!
interface Loopback9000
 ip address 91.151.112.9 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.45.5 255.255.255.0
 duplex full
!         
ip route 150.0.0.1 255.255.255.255 192.168.45.4 name BrAS
ip route 192.168.1.0 255.255.255.0 192.168.45.4 name CPE
!

Debugs/Outputs:

CPE1#debug dhcp detail 
DHCP client activity debugging is on (detailed)
CPE1#release dhcp ATM1/0.1


*Jan 14 21:18:13.511: DHCP: Release IPL called for interface ATM1/0.1 in state 5
*Jan 14 21:18:13.511: DHCP: SRelease attempt # 1 for entry:
*Jan 14 21:18:13.511: Temp IP addr: 192.168.1.5  for peer on Interface: ATM1/0.1
*Jan 14 21:18:13.511: Temp  sub net mask: 255.255.255.0
*Jan 14 21:18:13.515:    DHCP Lease server: 192.168.1.1, state: 10 Releasing
*Jan 14 21:18:13.515:    DHCP transaction id: 2185
*Jan 14 21:18:13.515:    Lease: 86400 secs,  Renewal: 43200 secs,  Rebind: 75600 secs
*Jan 14 21:18:13.515: Temp default-gateway addr: 192.168.1.1
*Jan 14 21:18:13.519:    Next timer fires after: 00:00:02
*Jan 14 21:18:13.519:    Retry count: 1   Client-ID: aaaa.aaaa.aaaa
*Jan 14 21:18:13.519:    Client-ID hex dump: AAAAAAAAAAAA
*Jan 14 21:18:13.519:    Hostname: CPE1
*Jan 14 21:18:13.519: DHCP: SRelease placed Server ID option: 192.168.1.1
*Jan 14 21:18:13.519: DHCP: SRelease: 259 bytes
*Jan 14 21:18:14.707: DHCP: SRelease attempt # 2 for entry:
*Jan 14 21:18:14.707: Temp IP addr: 192.168.1.5  for peer on Interface: ATM1/0.1
*Jan 14 21:18:14.707: Temp  sub net mask: 255.255.255.0
*Jan 14 21:18:14.707:    DHCP Lease server: 192.168.1.1, state: 10 Releasing
*Jan 14 21:18:14.711:    DHCP transaction id: 2185
*Jan 14 21:18:14.711:    Lease: 86400 secs,  Renewal: 43200 secs,  Rebind: 75600 secs
*Jan 14 21:18:14.711: Temp default-gateway addr: 192.168.1.1
*Jan 14 21:18:14.711:    Next timer fires after: 00:00:02
*Jan 14 21:18:14.711:    Retry count: 2   Client-ID: aaaa.aaaa.aaaa
*Jan 14 21:18:14.711:    Client-ID hex dump: AAAAAAAAAAAA
*Jan 14 21:18:14.711:    Hostname: CPE1
*Jan 14 21:18:14.711: DHCP: SRelease placed Server ID option: 192.168.1.1
*Jan 14 21:18:14.711: DHCP: SRelease: 259 bytes
*Jan 14 21:18:16.707: DHCP: SRelease attempt # 3 for entry:
*Jan 14 21:18:16.707: Temp IP addr: 192.168.1.5  for peer on Interface: ATM1/0.1
*Jan 14 21:18:16.707: Temp  sub net mask: 255.255.255.0
*Jan 14 21:18:16.707:    DHCP Lease server: 192.168.1.1, state: 10 Releasing
*Jan 14 21:18:16.711:    DHCP transaction id: 2185
*Jan 14 21:18:16.711:    Lease: 86400 secs,  Renewal: 43200 secs,  Rebind: 75600 secs
*Jan 14 21:18:16.711: Temp default-gateway addr: 192.168.1.1
*Jan 14 21:18:16.711:    Next timer fires after: 00:00:02
*Jan 14 21:18:16.711:    Retry count: 3   Client-ID: aaaa.aaaa.aaaa
*Jan 14 21:18:16.715:    Client-ID hex dump: AAAAAAAAAAAA
*Jan 14 21:18:16.715:    Hostname: CPE1
*Jan 14 21:18:16.715: DHCP: SRelease placed Server ID option: 192.168.1.1
*Jan 14 21:18:16.719: DHCP: SRelease: 259 bytes
*Jan 14 21:18:18.707: DHCP: Releasing ipl options:
*Jan 14 21:18:18.707:   Clearing default gateway and route to 192.168.1.1
*Jan 14 21:18:18.707:   Removing old default route 192.168.1.1
*Jan 14 21:18:19.095: RAC: DHCP stopped on interface ATM1/0.1
*Jan 14 21:18:49.707: DHCP: QScan: Purging entry
*Jan 14 21:18:49.707: DHCP: deleting entry 67484D00 192.168.1.5 from list
*Jan 14 21:18:49.707: Temp IP addr: 192.168.1.5  for peer on Interface: ATM1/0.1
*Jan 14 21:18:49.707: Temp  sub net mask: 255.255.255.0
*Jan 14 21:18:49.711:    DHCP Lease server: 192.168.1.1, state: 11 Purging
*Jan 14 21:18:49.711:    DHCP transaction id: 2185
*Jan 14 21:18:49.711:    Lease: 86400 secs,  Renewal: 43200 secs,  Rebind: 75600 secs
*Jan 14 21:18:49.711:    No timer running
*Jan 14 21:18:49.711:    Retry count: 0   Client-ID: aaaa.aaaa.aaaa
*Jan 14 21:18:49.711:    Client-ID hex dump: AAAAAAAAAAAA
*Jan 14 21:18:49.715:    Hostname: CPE1



BrAS#debug ip dhcp server packet detail 
DHCP server packet detail debugging is on.
BrAS#
*Jan 14 21:18:14.743: DHCPD: setting giaddr to 192.168.1.1.
*Jan 14 21:18:14.743: DHCPD: adding relay information option.
*Jan 14 21:18:14.747: DHCPD: relay information option content (add/replace):
*Jan 14 21:18:14.747:  DHCPD: 520e020c010100000000000010010029
*Jan 14 21:18:14.747: DHCPD: BOOTREQUEST from 01aa.aaaa.aaaa.aa forwarded to 150.0.0.50.
*Jan 14 21:18:16.755: DHCPD: setting giaddr to 192.168.1.1.
*Jan 14 21:18:16.755: DHCPD: adding relay information option.
*Jan 14 21:18:16.755: DHCPD: relay information option content (add/replace):
*Jan 14 21:18:16.755:  DHCPD: 520e020c010100000000000010010029
*Jan 14 21:18:16.759: DHCPD: BOOTREQUEST from 01aa.aaaa.aaaa.aa forwarded to 150.0.0.50.
BrAS#


DHCPSrv-GW#debug ip dhcp server packet detail
DHCPSrv-GW#
*Jan 14 21:18:14.735: DHCPD: DHCPRELEASE message received from client 01aa.aaaa.aaaa.aa (192.168.1.5).
*Jan 14 21:18:16.743: DHCPD: DHCPRELEASE message received from client 01aa.aaaa.aaaa.aa (192.168.1.5).
*Jan 14 21:18:16.743: DHCPD: Finding a relay for client 01aa.aaaa.aaaa.aa through relay 192.168.1.1.
DHCP server packet detail debugging is on.
DHCPSrv-GW#

CPE1#
CPE1#renew dhcp ATM1/0.1
*Jan 14 21:20:01.251: DHCP: DHCP client process started: 10
*Jan 14 21:20:01.263: RAC: Starting DHCP discover on ATM1/0.1
*Jan 14 21:20:01.263: DHCP: Try 1 to acquire address for ATM1/0.1
*Jan 14 21:20:01.283: DHCP: allocate request
*Jan 14 21:20:01.283: DHCP: new entry. add to queue, interface ATM1/0.1
*Jan 14 21:20:01.283: DHCP: SDiscover attempt # 1 for entry:
*Jan 14 21:20:01.283: Temp IP addr: 0.0.0.0  for peer on Interface: ATM1/0.1
*Jan 14 21:20:01.287: Temp  sub net mask: 0.0.0.0
*Jan 14 21:20:01.287:    DHCP Lease server: 0.0.0.0, state: 3 Selecting
*Jan 14 21:20:01.287:    DHCP transaction id: 100C
*Jan 14 21:20:01.287:    Lease: 0 secs,  Renewal: 0 secs,  Rebind: 0 secs
*Jan 14 21:20:01.287:    Next timer fires after: 00:00:04
*Jan 14 21:20:01.291:    Retry count: 1   Client-ID: aaaa.aaaa.aaaa
*Jan 14 21:20:01.291:    Client-ID hex dump: AAAAAAAAAAAA
*Jan 14 21:20:01.291:    Hostname: CPE1
*Jan 14 21:20:01.295: DHCP: SDiscover: sending 273 byte length DHCP packet
*Jan 14 21:20:01.295: DHCP: SDiscover 273 bytes 
*Jan 14 21:20:01.295:             B'cast on ATM1/0.1 interface from 0.0.0.0
*Jan 14 21:20:03.471: DHCP: Received a BOOTREP pkt
*Jan 14 21:20:03.471: DHCP: Scan: Message type: DHCP Offer
*Jan 14 21:20:03.471: DHCP: Scan: Server ID Option: 192.168.1.1 = C0A80101
*Jan 14 21:20:03.471: DHCP: Scan: Lease Time: 86400
*Jan 14 21:20:03.475: DHCP: Scan: Renewal time: 43200
*Jan 14 21:20:03.475: DHCP: Scan: Rebind time: 75600
*Jan 14 21:20:03.475: DHCP: Scan: Subnet Address Option: 255.255.255.0
*Jan 14 21:20:03.475: DHCP: Scan: Router Option: 192.168.1.1
*Jan 14 21:20:03.475: DHCP: rcvd pkt source: 192.168.1.1,  destination:  255.255.255.255
*Jan 14 21:20:03.479:    UDP  sport: 43,  dport: 44,  length: 308
*Jan 14 21:20:03.479:    DHCP op: 2, htype: 1, hlen: 6, hops: 0
*Jan 14 21:20:03.479:    DHCP server identifier: 192.168.1.1
*Jan 14 21:20:03.479:         xid: 100C, secs: 0, flags: 8000
*Jan 14 21:20:03.479:         client: 0.0.0.0, your: 192.168.1.6
*Jan 14 21:20:03.479:         srvr:   0.0.0.0, gw: 192.168.1.1
*Jan 14 21:20:03.483:         options block length: 60
*Jan 14 21:20:03.483: DHCP Offer Message   Offered Address: 192.168.1.6
*Jan 14 21:20:03.483: DHCP: Lease Seconds: 86400    Renewal secs:  43200    Rebind secs:   75600
*Jan 14 21:20:03.487: DHCP: Server ID Option: 192.168.1.1
*Jan 14 21:20:03.487: DHCP: offer received from 192.168.1.1
*Jan 14 21:20:03.487: DHCP: SRequest attempt # 1 for entry:
*Jan 14 21:20:03.487: Temp IP addr: 192.168.1.6  for peer on Interface: ATM1/0.1
*Jan 14 21:20:03.487: Temp  sub net mask: 255.255.255.0
*Jan 14 21:20:03.491:    DHCP Lease server: 192.168.1.1, state: 4 Requesting
*Jan 14 21:20:03.491:    DHCP transaction id: 100C
*Jan 14 21:20:03.491:    Lease: 86400 secs,  Renewal: 0 secs,  Rebind: 0 secs
*Jan 14 21:20:03.491:    Next timer fires after: 00:00:03
*Jan 14 21:20:03.491:    Retry count: 1   Client-ID: aaaa.aaaa.aaaa
*Jan 14 21:20:03.495:    Client-ID hex dump: AAAAAAAAAAAA
*Jan 14 21:20:03.495:    Hostname: CPE1
*Jan 14 21:20:03.495: DHCP: SRequest- Server ID option: 192.168.1.1
*Jan 14 21:20:03.499: DHCP: SRequest- Requested IP addr option: 192.168.1.6
*Jan 14 21:20:03.499: DHCP: SRequest placed lease len option: 86400
*Jan 14 21:20:03.499: DHCP: SRequest: 291 bytes
*Jan 14 21:20:03.499: DHCP: SRequest: 291 bytes
*Jan 14 21:20:03.499:             B'cast on ATM1/0.1 interface from 0.0.0.0
*Jan 14 21:20:03.623: DHCP: Received a BOOTREP pkt
*Jan 14 21:20:03.627: DHCP: Scan: Message type: DHCP Ack
*Jan 14 21:20:03.627: DHCP: Scan: Server ID Option: 192.168.1.1 = C0A80101
*Jan 14 21:20:03.627: DHCP: Scan: Lease Time: 86400
*Jan 14 21:20:03.627: DHCP: Scan: Renewal time: 43200
*Jan 14 21:20:03.627: DHCP: Scan: Rebind time: 75600
*Jan 14 21:20:03.627: DHCP: Scan: Subnet Address Option: 255.255.255.0
*Jan 14 21:20:03.631: DHCP: Scan: Router Option: 192.168.1.1
*Jan 14 21:20:03.631: DHCP: rcvd pkt source: 192.168.1.1,  destination:  255.255.255.255
*Jan 14 21:20:03.631:    UDP  sport: 43,  dport: 44,  length: 308
*Jan 14 21:20:03.631:    DHCP op: 2, htype: 1, hlen: 6, hops: 0
*Jan 14 21:20:03.631:    DHCP server identifier: 192.168.1.1
*Jan 14 21:20:03.635:         xid: 100C, secs: 0, flags: 8000
*Jan 14 21:20:03.635:         client: 0.0.0.0, your: 192.168.1.6
*Jan 14 21:20:03.635:         srvr:   0.0.0.0, gw: 192.168.1.1
*Jan 14 21:20:03.635:         options block length: 60
*Jan 14 21:20:03.635: DHCP Ack Message
*Jan 14 21:20:03.639: DHCP: Lease Seconds: 86400    Renewal secs:  43200    Rebind secs:   75600
*Jan 14 21:20:03.639: DHCP: Server ID Option: 192.168.1.1
*Jan 14 21:20:06.659: DHCP: Releasing ipl options:
*Jan 14 21:20:06.659: DHCP: Applying DHCP options:
*Jan 14 21:20:06.659:   Setting default_gateway to 192.168.1.1
*Jan 14 21:20:06.663:   Adding default route 192.168.1.1
*Jan 14 21:20:06.719: Allocated IP address = 192.168.1.6  255.255.255.0
*Jan 14 21:20:06.719: %DHCP-6-ADDRESS_ASSIGN: Interface ATM1/0.1 assigned DHCP address 192.168.1.6, mask 255.255.255.0, hostname CPE1
*Jan 14 21:20:07.663: DHCP Client Pooling: ***Allocated IP address: 192.168.1.6

BrAS#
*Jan 14 21:20:01.447: DHCPD: relay binding created for client 01aa.aaaa.aaaa.aa.
*Jan 14 21:20:01.447: DHCPD: setting giaddr to 192.168.1.1.
*Jan 14 21:20:01.447: DHCPD: adding relay information option.
*Jan 14 21:20:01.447: DHCPD: relay information option content (add/replace):
*Jan 14 21:20:01.451:  DHCPD: 520e020c010100000000000010010029
*Jan 14 21:20:01.451: DHCPD: BOOTREQUEST from 01aa.aaaa.aaaa.aa forwarded to 150.0.0.50.
*Jan 14 21:20:03.479: DHCPD: forwarding BOOTREPLY to client aaaa.aaaa.aaaa.
*Jan 14 21:20:03.483: DHCPD: Setting giaddr to 192.168.1.1
*Jan 14 21:20:03.483: DHCPD: validating relay information option.
*Jan 14 21:20:03.483: DHCPD: relay information option removed
*Jan 14 21:20:03.483:  outbound IF index  = 4
*Jan 14 21:20:03.487:  outbound IF sub-index = 10
*Jan 14 21:20:03.487: DHCPD: Keeping state: Forwarding BOOTREPLY to client aaaa.aaaa.aaaa, on UNNUM-IF
*Jan 14 21:20:03.559: DHCPD: Finding a relay for client 01aa.aaaa.aaaa.aa on interface ATM1/0.10.
*Jan 14 21:20:03.559: DHCPD: setting giaddr to 192.168.1.1.
*Jan 14 21:20:03.559: DHCPD: adding relay information option.
*Jan 14 21:20:03.559: DHCPD: relay information option content (add/replace):
*Jan 14 21:20:03.559:  DHCPD: 520e020c010100000000000010010029
*Jan 14 21:20:03.563: DHCPD: BOOTREQUEST from 01aa.aaaa.aaaa.aa forwarded to 150.0.0.50.
*Jan 14 21:20:03.619: DHCPD: forwarding BOOTREPLY to client aaaa.aaaa.aaaa.
*Jan 14 21:20:03.619: DHCPD: Setting giaddr to 192.168.1.1
*Jan 14 21:20:03.623: DHCPD: validating relay information option.
*Jan 14 21:20:03.627: DHCPD: relay information option removed
*Jan 14 21:20:03.627:  outbound IF index  = 4
*Jan 14 21:20:03.627:  outbound IF sub-index = 10
*Jan 14 21:20:03.627: DHCPD: Keeping state: Forwarding BOOTREPLY to client aaaa.aaaa.aaaa, on UNNUM-IF

DHCPSrv-GW#
*Jan 14 21:20:01.439: DHCPD: DHCPDISCOVER received from client 01aa.aaaa.aaaa.aa through relay 192.168.1.1.
*Jan 14 21:20:01.443: DHCPD: Allocate an address without class information (192.168.1.0)
*Jan 14 21:20:03.443: DHCPD: Sending DHCPOFFER to client 01aa.aaaa.aaaa.aa (192.168.1.6).
*Jan 14 21:20:03.443: DHCPD: unicasting BOOTREPLY for client aaaa.aaaa.aaaa to relay 192.168.1.1.
*Jan 14 21:20:03.579: DHCPD: DHCPREQUEST received from client 01aa.aaaa.aaaa.aa.
*Jan 14 21:20:03.583: DHCPD: No default domain to append - abort update
*Jan 14 21:20:03.583: DHCPD: Sending DHCPACK to client 01aa.aaaa.aaaa.aa (192.168.1.6).
*Jan 14 21:20:03.583: DHCPD: unicasting BOOTREPLY for client aaaa.aaaa.aaaa to relay 192.168.1.1.
DHCPSrv-GW#

More:
http://blog.ine.com/2009/07/22/understanding-dhcp-option-82/
http://www.cisco.com/en/US/docs/ios/12_4t/ip_addr/configuration/guide/htdhcpre.html
http://www.cisco.com/en/US/docs/ios/12_3t/12_3t4/feature/guide/gdhcpopt.html
http://www.cisco.com/en/US/docs/ios/12_3t/12_3t4/feature/guide/gtdhcprr.html
http://www.cisco.com/en/US/docs/ios/12_4t/ip_addr/configuration/guide/htdhcpre.html

NTP - ACL

NTP - Network Time Protocol Packet types: -  Control messages : don't bother with this. -  NTP request/update messages: used for time sy...