Ads 468x60px

Wednesday, May 18, 2011

NTP – Network Time protocol


Today, in this section we will discuss about NTP protocol. This is commonly used in every network. 

As you know time is very important parameter in monitoring of routers and any network devices.The best practices recommend having same clock synchronized between all network devices (Routers/Switches/etc).
          
             This will help to maintain logs and troubleshoot any network incident. Suppose anything wrong happens in network and while troubleshooting we are reviewing logs. That time we will find all devices with different clocks, some are not configured. So it will be big problem when exactly the incident happened and what is status of supporting devices at that time.

The Network Time Protocol (NTP) is a protocol designed to time synchronization in network. NTP runs over UDP, which in turn runs over IP. We configure NTP to provide accurate timestamps for system log messages.

NTP versions was described in below RFCs–

  •  NTP v1 - RFC 958
  •  NTP v2 - RFC 1119  
  •  NTP v3 - RFC 305
  •  NTP v4 - RFC 5905

NTPv4 overview-

NTP Version 4 (NTPv4) is an extension of NTP version 3. NTPv4 supports both IPv4 and IPv6 and is backward-compatible with NTPv3.

  • NTPv4 supports IPv6, making NTP time synchronization possible over IPv6.
  • Security is improved over NTPv3. The NTPv4 protocol provides a whole security framework based on public key cryptography and standard X509 certificates.
  • Using specific multicast groups, NTPv4 can automatically calculate its time-distribution hierarchy through an entire network. 
  • NTPv4 automatically configures the hierarchy of the servers in order to achieve the best time accuracy for the lowest bandwidth cost. This feature leverages site-local IPv6 multicast addresses.

Stratum- you can see stratum levels in show ntp status.
Let see what is stratum -
         Stratum levels define the distance from the reference clock to device (router). Stratum describes accuracy of your clock.
         When you enable NTP, Router/network devices can learn clock from many sources in 
network.
         For selection of best NTP server/clock in available sources. Stratum will help router 
to find most accurate clock. Whichever device is having lowest stratum that is best.

It is common to see stratum 3, 4

Detailed example of  stratum levels -
  • Stratum 0 - will be for GPS devices and Atomic clocks.
  • Stratum 1 - These are servers/ computers which connect to GPS devices and atomic clocks. These server acts as servers which serve time in hierarchal way to downstream devices.
  • Stratum 2 - These are computers/ network devices. Which send NTP request to stratum 1 devices to synchronize most accurate clock. Stratum 2 servers can serve time to stratum 2 servers also
  • Stratum 3 - these devices also perform same function like Stratum 2 , These servers collects the data from startum 2 servers.
Below diagram will explain you about stratum levels.



Hope this diagram will help you for better understanding about stratum.

Working flow of NTP -

NTP communication consists of time requests and control queries. Time requests provide the standard client/server relationship in which a client requests time synchronization from an NTP server.
             Control queries provide ways for remote systems to get configuration information and reconfigure NTP servers.

NTP modes -

NTP can operate in four different modes--client, server, peer, and broadcast. These modes provide NTP with a great amount of flexibility in configuration and synchronization in network.

Here is a short explanation of the NTP modes:

  • Client Mode - An NTP client is configured to let its clock be set and synchronized by an external NTP timeserver (Router/server/etc). NTP clients can be configured to use multiple servers to set their local time and are able to give preference to the most accurate time sources. They will not provide synchronization services to any other devices. 
  • Server Mode -An NTP server is configured to synchronize NTP clients. Servers can be configured to synchronize any client or only specific clients.NTP servers will not accept synchronization information from their clients and will not let clients update or affect the server's time settings.
  • Peer Mode -With NTP peers, one NTP-enabled device does not have authority over the other. With the peering model, each device shares its time information with the other, and each device can also provide time synchronization to the other.
  • Broadcast/multicast Mode -Broadcast/multicast mode is a special NTP mode with which the NTP server broadcasts its synchronization information to all clients. Broadcast mode requires that clients be on the same subnet as the server.Multicast mode requires that clients and servers have multicast access available and configured.

Hope this information is informative for you..

For like and queries, Plz put comment with your mail id ...

Monday, May 16, 2011

PPPoE Configurations - Maipu and Cisco


In last post we saw, PPPoE theory, In this post we will see Maipu and Cisco router configurations for PPPoE.
Maipu Basic Commands for Configuring -PPPoE
Command
Description
Configuration Mode
pppoe enable
Enable PPPoE server.
pppoe-client dial-pool-number number
Configure PPPoE client.
config-if-××
pppoe-client auto-dial always
*Configure the auto dialing of the PPPoE client
config-if-××
pppoe-client auto-dial time-range string
*Configure PPPoE client to perform the automatic dialing according to the set time
config-if-××
vpdn enable
*Enable VPDN.
Config
vpdn-group number
Configure VPDN group
Config
accept-dialin
*Configure VPDN as accepting dial-in
config-vpdn
protocol pppoe
*Configure the application protocol over VPDN
config-vpdn-acc-in
pppoe limit per-mac number
*Configure the maximum connection number of the same mac address at PPPoE client
config-vpdn
virtual-template number
*Configure the template number used when VPDN accepting dial-in
config-vpdn-acc-in
local name host-name
Configure VPDN  device name
config-vpdn

PPPoE Normal Configuration - Maipu


Configuration instance 1
Description -

As shown in the above figure, PPPoE client (Router-a) sets up the PPPoE connection with the PPPoE server via the Ethernet interface.

The configuration of Router-a:
Description
Router (config)#dialer-list 1 protocol ip permit
Configure the data type of triggering dialer
Router (config)#interface dialer0
Configure dialer interface
Router (config-if-dialer0)#ip address negotiated
Configure IP address
Router (config-if-dialer0)# encapsulation ppp
Encapsulate the PPP protocol.
Router (config-if-dialer0)#dialer in-band
Enable DDR dialer
Router (config-if-dialer0)#dialer-group 1
Reference triggering list
Router (config-if-dialer0)#dialer pool 1
Configure dialer pool
Router (config-if-dialer0)#exit
Exit interface
Router (config)#interface fastethernet0
Enter into Ethernet interface
Router (config-if-fastethernet0)# pppoe-client dial-pool-number 1
Configure PPPoE client and put F0 interface into dialer group 1
Router (config-if-fastethernet0)#exit
Exit interface
Router (config )#ip route 0.0.0.0 0.0.0.0 dialer0
Configure the default route

The configuration of Router-b:
Command
Description
Router(config)#int loopback 0
Configure loopback 0
Router(config-if-loopback0)#ip address 12.1.1.1 255.0.0.0
Configure the IP address of the loopback port
Router(config-if-loopback0)#exit

router(config)# ip local pool pppoe-pool 172.16.20.10 172.16.20.100
Configure address pool
Router (config)#int virtual-template 1
Configure PPPoE virtual template interface
Router (config-if-virtual-template1)#ip unnumber loopback0
Configure the IP address of the interface. It is recommended to use the ip unnumber command. Configure IP address directly for virtual template. The load balance results in the PPPOE server can only enable the sixth valid connection.
Router (config-if-virtual-template1)#encapsulation ppp
Encapsulate the PPP protocol
Router (config-if-virtual-template1)#peer default ip address pool pppoe-pool
The address pool adopted when distributing the IP address to the client
Router (config-if-virtual-template1)#exit

Router (config)#vpdn enable
Enable VPDN virtual tunnel
Router (config)#vpdn-group 1
Create virtual channel group
Router (config-vpdn)# pppoe limit per-mac 2
The same mac of the client is allowed to create two PPPoE connections.
Router (config-vpdn)#local name pppoe-server
The command is used to configure ac-name on the Ethernet interface when configuring the PPPoE client
Router (config-vpdn)#accept-dialin
Configure VPDN as accepting dialin
Router (config-vpdn-acc-in)#protocol pppoe
Specify the application protocol over VPDN
Router (config-vpdn-acc-in)#virtual-template 1
Specify the virtual template interface number used during the PPPoE  session
Router (config-vpdn-acc-in)#exit

Router (config-vpdn)#exit

Router (config)#interface fastethernet0
Configure fastethernet0 as the PPPoE server port
Router (config-if-fastethernet0)#pppoe enable
Enable the PPPoE protocol
Router (config-if-fastethernet0)#exit


For Cisco configurations – Plz visit –

For any feedback, Plz commet with your mail id.. 

Related Posts Plugin for WordPress, Blogger...