TCPIP Advanced Fundamentals and Routed Protocol Features
TCPIP Advanced Fundamentals and Routed Protocol Features
TCPIP Advanced Fundamentals and Routed Protocol Features
fundamentals
& Routed
Protocol features
60
DHCP Services
• DHCP is used to provide dynamic IP address allocation to
TCP/IP hosts and Cisco Systems devices. It utilizes a
client/server model, and the DHCP server can be a Windows
server, a UNIX-based server, or a Cisco IOS device.
61
Understanding the Function of DHCP
-It is an application using UDP ports (67 for server messages & 68
for client messages).
The figure shows the steps that occur when a DHCP client requests an
IP address from a DHCP server.
1. The host sends a DHCPDISCOVER broadcast message to locate a
DHCP server.
2. A DHCP server offers configuration parameters such as an IP address,
a MAC address of DHCP server, a domain name, a default gateway, and
a lease for the IP address to the client in a DHCPOFFER unicast
message.
3. The client returns a formal request for the offered IP address to the
DHCP server in a DHCPREQUEST broadcast message.
4. The DHCP server confirms that the IP address has been allocated to
the client by returning a DHCPACK unicast message to the client.
A DHCP client may receive offers from multiple DHCP servers and can
accept any one of the offers. However, the client usually accepts the
first offer that it receives. Also, the offer from
the DHCP server is not a guarantee that the IP address will be allocated
to the client. The server usually reserves the address until the client has
had a chance to formally accept the address. 62
DHCP supports three possible address allocation mechanisms:
- Manual: The network administrator assigns the IP address to a
specific MAC address.
DHCP is used to dispatch the assigned address to the host.
- Automatic: The IP address is permanently assigned to a host.
- Dynamic: The IP address is assigned to a host for a limited time or
until the host explicitly releases the address. This mechanism supports
automatic address reuse when the host to which the address has been
assigned no longer needs the address.
•Remote Router
ip dhcp pool client
network 20.0.0.0 255.255.255.0
ip dhcp-excluded address 20.0.0.2
default-router 20.0.0.2
import all
interface fastethernet0/0
ip address dhcp
69
NTP (Network Time Protocol)
It is an application using UDP port 123 used for dynamic time adjustement and
synchrinization, latest version is 4.
Imagine that you are reviewing device logs collected in a router’s buffer and are
attempting to correlate the events in the device logs with an issue that you are
troubleshooting. To make that correlation, the logged events need to have
accurate timestamps.
Although you could individually set the clock on each of your routers, those
clocks might drift over time and not agree. You might have heard the saying that
a man with one watch always knows what time it is, but a man with two watches
is never quite sure. This implies that devices need to have a common point of
reference for their time. Such a reference point is made possible by Network
Time Protocol (NTP), which allows routers to point to a device acting as an NTP
server. Because devices in different time zones might reference the same NTP
server, each device has its own time zone configuration, which indicates how
many hours its time zone differs from Greenwich Mean Time (GMT).
NTP uses a value, called a stratum value, to indicate the believability of a time
source. Valid stratum values are in the range 0–15, with a value of 16 being used
to indicate that a device does not have its time synchronized. However, Cisco
IOS only permits you to set stratum values in the range 1–15.
Lower stratum values are considered more authoritative than higher stratum
values, with a stratum value of 0 being the most authoritative. Stratum
calculations work much like a hop count.
For example, an Internet-based time source using a cesium clock might have a
stratum value of a 0. If one of your routers learns time from this stratum 0 time
source, your router will have a stratum level of 1.
If other devices (for example, servers, switches, and other routers) in your
network get their time from your stratum 1 router, they will each have a stratum
level of 2.
71
Ahmed Nabil
For NTP to Synchronize time, ther are two methods:
Method1:
-Clients listen to NTP server btroadcasts to synchronize and adjust its
clock.
Server(config)#ntp master 3
Server(config)#int fa0
Server(config-if)#ntp broadcast …. Allow server to send broadcast
packet containing the time.
Clinet(config)#int fa1
Client(config-if)# ntp broadcasts client ..allow ntp client to receive ntp
broadcasts on that interface
Method2:
- Clients polls (request & wait reply) NTP server for time.
Server(config)#ntp master 3
Three-Way Handshake
The process of setting up a TCP session involves a three-way
handshake, as listed in the following steps and as illustrated.
Step 1. The session initiator sends a Synchronization (SYN)
message to the target host.
Step 2. The target host acknowledges receipt of the SYN
message with an Acknowledgment (ACK) message and also
sends a SYN message of its own.
Step 3. The session initiator receives the SYN messages from the
target host and acknowledges receipt by sending an ACK
message.
74
Ahmed Nabil
If a single TCP flow drops a packet, that flow might experience
TCP slow start, meaning that the window size is reduced to one
segment. The window size then grows exponentially until it
reaches one-half of its congestion window size (that is, the
window size when congestion was previously experienced). At
that point, the window size begins to grow linearly instead of
exponentially.
If a router interface‘s output queue fills to capacity, all TCP flows
can simultaneously start to drop packets, causing all TCP flows to
experience slow start. This condition, called global
synchronization or TCP synchronization, results in a very
inefficient use of bandwidth, because of all TCP flows having
reduced window sizes and therefore spending more time
waiting for acknowledgments.
That case also may happen if you added UDP traffic to your
network on same Class of Service as current TCP traffic, also
TCP will suffer GLOBAL Synchronization or that case called (UDP
Dominance), unfortunately mixing TCP and UDP with no
QoS network will suffer from:
-Starvation
- Lower Throughput
- Latency
Note
To prevent global synchronization, feature called Weighted
Random Early Detection (WRED), which can randomly drop
packets from flows based on the number of packets currently in a
queue and the quality of service (QoS)
markings on the packets. By dropping packets before the queue
fills to capacity, the global synchronization issue is avoided.
75
Ahmed Nabil
TCP now has many modern options discussed below.
77
2- NAT and PAT:
- Network Address Translation is used to translate the inside
local address to inside global address.
- Port Address Translation uses the IP address and port
numbers to translate many local IPs to one global IP address.
- Currently after writing the configuration related to each type of
NAT, we will need to activate the NAT on interfaces, on new
IOS use (config)#ip nat enble
that command will create NVI (NAT Virtual Interface) to activate
NAT, instead of the old commands (IP NAT inside & IP NAT
outside NAT on physical interfaces)
a) Static NAT
- Fixed one local to one global address translation, that type
mainly used with servers
(config)#ip nat inside source static private ip public ip
b) Dynamic NAT
- Each local address can be translated to one global address
picked up by the NAT device from a NAT pool of addresses
(config)#ip nat inside source list ACL no. or name pool pool name
78
Ahmed Nabil
c) Dynamic NAT with Overload (PAT) or also called
NAPT (Network Address and Port Address Translation)
-Many local devices can use one global address, by translating
port numbers (tanslating socket no.)
-If you have many global address, so you need a NAT pool.
(config)#ip nat inside source list ACL no. or name pool pool name overload
(config)#ip nat pool pool name start ip end ip netmask mask
or
We can use IP on interface for PAT instead of using a pool.
(config)#ip nat inside source list ACL no. or name interface interface
overload
Subnet mask:
Solution
192.168.49.160/30
192.168.49.164/30
192.168.49.168/30
192.168.49.172/30
192.168.49.176/30
81
5- IP un-numbered:
Any layer 3 interface need IP address to be active (live
and kicking in IP world).
But in some cases may be we need to activate interface
without wasting IPs, in that case IP unnumbered is the
solution, where you can deceive the interface by giving
it a null IP.
On router:
(config)# int s0/0
(config-if)# ip unnumbered <int. name>
- This is the only case that the two routers see each
other and the two serial interfaces are not in the same
subnet.
82
6- Route summarization:
- It is grouping a set of subnet and advertise them as one
summary address.
Ex1: Summarize the networks from 172.16.12.0/24 till
172.16.15.0/24
These networks
must be advertised
as 3 entries
83
7- CIDR:
- Classless Inter Domain Routing (supernetting).
- It is grouping a set of major networks and advertise
them as one super network (CIDR block).
84