Example: NTP configuration in server mode:
! Configure the router as an NTP server
ntp master
! Check the current NTP status
show ntp status
! Check the NTP associations
show ntp associations
In this example, the router is configured as an NTP server by using the ntp master command. Clients on the network can then use this router as a source for NTP synchronization. The show ntp status and show ntp associations commands can be used to verify the NTP configuration in the same way as described for the NTP client configuration.
Inside source NAT configuration
Inside source NAT (Network Address Translation)
is a method of remapping one IP address space into another by modifying network address information in the IP header of packets while they are in transit across a traffic routing device. The technique was originally used for ease of rerouting traffic in IP networks without readdressing every host.
In the context of inside source NAT, the term "inside" refers to the private network that is being translated, while the term "source" refers to the IP address of the inside host that is being translated. When an inside host initiates a connection to the outside network, its source IP address is translated to a different IP address, usually an address assigned from a public IP address pool. This allows multiple inside hosts to share a single public IP address while communicating with the outside network.
Inside source NAT is commonly used in enterprise networks to conserve public IP addresses and to provide a level of security and privacy by hiding the internal network IP addresses from the outside network.
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
interface FastEthernet0/1
ip address 10.1.1.1 255.255.255.0
ip nat inside source static 192.168.1.10 10.1.1.10
ip nat inside source static 192.168.1.11 10.1.1.11
In this example, two inside hosts with IP addresses 192.168.1.10 and 192.168.1.11 are statically mapped to the IP addresses 10.1.1.10 and 10.1.1.11, respectively, on the outside network.
Dynamic inside source NAT configuration using pool example
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
interface FastEthernet0/1
ip address 10.1.1.1 255.255.255.0
ip nat pool mynatpool 10.1.1.100 10.1.1.200 netmask 255.255.255.0
ip nat inside source list 1 pool mynatpool
access-list 1 permit 192.168.1.0 0.0.0.255
In this example, the NAT pool mynatpool is defined with a range of IP addresses from 10.1.1.100 to 10.1.1.200. The access-list 1 permits all inside IP addresses from the subnet 192.168.1.0/24. Any inside host that needs to access the outside network will be dynamically mapped to an IP address from the mynatpool NAT pool.
To verify the NAT configuration, you can use the following commands:
show ip nat translations
show ip nat statistics
These commands display the current NAT translations and NAT statistics, respectively.