IP Networks

79
Confidential Information of Huawei. No Spreading without Security Level: Internal IP NETWORKS Section 1 TCP/IP Architecture and Implementat Section 2 Link Layer Protocols Section 3 Network Layer Protocols Section 4 Transport layer protocols Section 5 IP Routing

Transcript of IP Networks

Page 1: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

IP NETWORKS Section 1 TCP/IP Architecture and Implementation

Section 2 Link Layer Protocols

Section 3 Network Layer Protocols

Section 4 Transport layer protocols

Section 5 IP Routing

Page 2: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

OSI Reference Model

Application Application programs

Data format and representation

Interhost communication

End-to-End connections

Addresses and best path

Access to media

Binary transmission

Representation

Session

Transport

Network

Data link

Physical

Page 3: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

OSI Layer Interaction

The Physical Layer (Layer 1) ensures bit synchronization and places the received binary pattern into a buffer. It notifies the Data Link Layer (Layer 2) that a frame has been received after decoding the incoming signal into a bit stream. Thus, Layer 1 provides delivery of a stream of bits across the medium.

The Data Link Layer (Layer 2) examines the frame check sequence (FCS) in the trailer to determine whether errors occurred in transmission, providing error detection. If an error has occurred, the frame is discarded. The current host examines the data link address to determine if the data is addressed to it or whether to process the data further. If the data is addressed to the host, the data between the Layer 2 header and trailer is handed over to the Network Layer (Layer 3) software. Thus, the data link layer delivers data across the link.

Page 4: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

The Network Layer (Layer 3) examines the destination address. If the address is the current host's address, processing continues and the data after the Layer 3 header is handed over to the Transport Layer

(Layer 4) software. Thus, Layer 3 provides end-to-end delivery.

• Layer 4 Transport Layer provides error recovery. After error recovery and reordering of the incoming data, the data is given to the Session Layer (Layer 5).

• The Session Layer (Layer 5) ensures that a series of messages is completed.. After the session layer ensures that all flows are completed, it passes the data

Page 5: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

after the Layer 5 header to the Presentation Layer (Layer 6) software.

The Presentation Layer (Layer 6) defines and manipulates the data format of the data transmission. It converts the data to the proper format specified in the Layer 6 header. After the data formats have

been converted, the data after the Layer 6 header is passed to the Application Layer (Layer 7) software.

• The Application Layer (Layer 7) processes the final header and examines and delivers the end-user data..

Page 6: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

TCP/IP Transmission Mode

Application Layer Transport layer Network layer Link layer Physical layer

Network layer

Link layer

Physical layer

Link layer

Physical layer

Network layer

Link layer

Physical layer

Application Layer Transport layer Network layer Link layer Physical layer

Terminal system Router Terminal system Router Bridg

e

Page 7: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Port Protocol UDP port 15 NETSTAT

TCP port 21 FTP TCP port 23 Telnet TCP port 25 SMTPUDP port 53 DNS UDP port 69 TFTP

TCP port 70 Gopher TCP port 79 Finger TCP/UDP port 80 HTTP

TCP port 110 POP3UDP port 111 RPC

TCP port 119 NNTP (Network News Transfer Protocol)

TCP port 123 NTP UDP port 137 NetBIOS name

service UDP port 161 SNMP network

monitorUDP port 2049 NFS

TCP Source Ports

Page 8: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

About this Session Section 1 TCP/IP Architecture and Implementation

Section 2 Link Layer Protocols

Section 3 Network Layer Protocols

Section 4 Transport layer protocols

Section 5 IP Routing

Page 9: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Link Layer Protocols PPPLAN and WAN

Page 10: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

LAN and WAN

Different coverage ranges LAN: Applicable to limited geographical areas WAN: Applicable to remote connection

Different rates LAN: 10Mbps, 100Mbps and 1000Mbps WAN: 64Kbps, 128Kbps, 384Kbps and 2Mbps

Different technologies are used

Page 11: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

LAN Types

Ethernet Switching Ethernet (mainstream of LAN currently) Token ring network FDDI (Fiber distributed digital interface)

Page 12: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

What is Ethernet?

Ethernet is a LAN implementation technology defined by IEEE Std 802.3 as part of the LAN/MAN standards

802.X protocol suite specifies the access mode of network, and the technologies of the switching Ethernet and fast Ethernet are all named 802.X protocol

Page 13: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Ethernet Standard 802.1 LAN/MAN Management (and MAC Control Bridges)

802.2 Logical Link Control 802.3 CSMA/CD 802.4 Token Bus 802.5 Token Ring 802.6 Distributed Queue Dual Bus (DQDB) Metropolitan Area Network (MAN) 802.7 Broadband Local Area Networks 802.8 Fiber-Optic LANs and MANs 802.9 Integrated Services (IS) LAN Interface 802.10 LAN/MAN Security 802.11b Wireless LAN 802.12 Demand Priority Access Method

Page 14: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Ethernet Physical Structure

Bus type (10BASE2 and 10BASE5 at early stage) A B

Star type (other Ethernet types after 10BASE-T)

C

H I J

D E F

K L M

Relay

Hub/Bridg

e

A B C D E F

Hub/Bridg

e

Page 15: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Ethernet Work Principle – CSMA/CD

CSMA/CD: Carrier Sense Multi Access with Collision Detection

Carrier sense: Detection before transmission Collision detection: Detection during transmission Backoff: Handling after a collision is detected

Page 16: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Commonly Used Devices in LAN

HUBLAN SWITCHROUTERTwisted pair Optical fiber Network card

Page 17: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

HUB

It works in the physical layer and copies binary bits one by

one among cables It is a kind of shared network device connecting together

network cables that are connected to different computers. and the communication can be connected only between two ports at a certain time

Gradually washed out in network applications

Page 18: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

LAN SWITCH

It works in the link layer and stores and forwards frames between LANs

It connects many hubs through network cables to constitute a larger network

It connects computer terminals to constitute a LAN

Page 19: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Twisted Pair 10BASE-T

10:the transmission rate is 10Mbps; BASE: using base band signal; T: twisted pair; Transmission distance: a maximum of 100m for Category 3/4/5 unshielded twisted pair cable and Category 5 shielded twisted pair cable

100BASE-TX 100:the transmission rate is 100Mbps; Transmission distance: a

maximum of 100m for Category 5 unshielded twisted pair cable and Category 5 shielded twisted pair cable

10BASE2

2: thin coaxial cable. The maximum transmission distance is 185m 10BASE5

5: thick coaxial cable. The maximum transmission distance is 500m

Page 20: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Optical fiber

100BASE-FX The maximum transmission distance of the single-mode optical

fiber is 15km and the maximum transmission distance of the multi-mode optical fiber is 2km for the 100Mbps Ethernet

1000BASE-SX Short wavelength optical fiber, 1000Mbps Ethernet, the maximum

transmission distance of the multi-mode optical fiber is 220m 1000BASE-LX

Long wavelength optical fiber, 1000Mbps Ethernet, the maximum transmission distance of a multi-mode optical fiber is 550m, the maximum transmission distance of a single-mode optical fiber is 10km

Page 21: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Shared Ethernet

HUB When any port receives a

packet, this packet will be broadcast to all the ports directly, logically constituting

a shared medium If two or more ports receive

packets simultaneously, collision will occur, and DTE will implement the CSMA/CD algorithm

Only one DTE can implement valid transmission at a certain

moment

A B D

Col l i si on

CCol l i si on Col l i si on Col l i si on

Page 22: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Switched Ethernet

Bridge (LAN SWITCH) It implements address learning acco

rding to SA (Source Address) of the received packet to establish the corresponding relation between address and port

After receiving a packet, it checks the table according to DA (Destination Address) of the packet and forwards the packet to the specific port

Multiple DTEs can implement valid transmission at a certain moment, and no mutual interference will occur

A B C D

Page 23: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Ethernet Cables

There are 3 main types of Ethernet Cables used for different purposes, namely

Straight through- Cable : A straight-through cable is used to connect Host (PC) Switch or Hub Router ---> Switch or Hub Crossover Cable: A crossover cable an be used to connect Switch --> Switch Hub Hub Host Host Hub Switch Router Host

Page 24: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Rolled or Rolled-Over Cable: Used to connect a host to a router console serial communication (com) port. This cable is usually used when configuring one of these devices for the first time. A rolled cable connects the PC’s serial port (using a DB9 to RJ45 adaptor) to the router or switch’s console port. A rolled Cable pin out is giving below

Page 25: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Page 26: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Page 27: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Shared Ethernet vs. Switched Ethernet

Shared Ethernet Vs Switched Ethernet Topology Structure Work mode Bandwidth Equipment Equipment processing layer

Technology

Bus or starHalf Duplexshared mediumHub, relay Physical layer

CSMA/CD

StarFull Duplexexclusive mediumBridge, Switch MAC layerAddress learning a

nd switching

Page 28: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

WAN Types

Packet-switched network X25 : X.25 protocol is the interface procedure between DTE and DCE Frame Relay: FR is the second layer network, and it is the simplified X.25 .FR can be used at the Gb interfaceLines are not exclusively occupied, thus, the utilization rate is high

Page 29: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

About this Session Section 1 TCP/IP Architecture and Implementation

Section 2 Link Layer Protocols

Section 3 Network Layer Protocols

Section 4 Transport layer protocols

Section 5 IP Routing

Page 30: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Network Protocols IPARPRARPICMPProtocol application

Page 31: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

IP

IP——Internet Protocol. As a network layer protocol of the TCP/IP protocol suite, IP is u

sed to transmit datagrams of the transport layer and the application layer.

IP identifies the source and destination through IP address.

Page 32: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

IP Address An IP address is a unique 32-bit address assigned to

each host connected to Internet.

0 net-id host-id

1 0 net-id host-id

1 1 0 net-id host-id

1 1 1 0 Multicast address

1 1 1 1 0 Reserved for future use

0 1 2 3 4 8 16 24 31

Class A

Class B

Class C

Class D

Class E

Page 33: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Network Address Range: Class AThe designers of the IP address scheme decided the first bit of the first byte in

a Class A network address must always be off, or 0. This means a Class A address must be between 0 and 127, inclusive.

Consider the following network address: 0xxxxxxxIf we turn the other 7 bits all off and then turn them all on, we’ll find the Class

A range of network addresses: 00000000 = 0 01111111 = 127 So, a Class A network is defined in the first octet between 0 and 127, and it

can’t be less or more. (yes, I know 0 and 127 are not valid in a class A network—I’ll talk about illegal addresses in a minute.)

Page 34: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Class A Addresses 1st byte used for Network Address, remaining 3 are used for

Host Class A address format is network.node.node.nodeFor example, in the IP address 49.22.102.70, the 49 is the

network address, and 22.102.70 is the node address..Class A network addresses are one byte long, with the first

bit of that byte reserved and the 7 remaining bits available for manipulation (addressing). Thus class A can have maximum of 2^7 Networks= 128 The network address of all 0s (0000 0000) is reserved to designate

the default route and 127 ,reserved for loopback cant be used. Thus only 1 to 126 can be used to designate class A network address.

Each Class A address has three bytes (24-bit positions) for the node address of a machine. This means there are 2^24—or 16,777,216 .As above addresses of all 0s and all 1s are reserved. So a whooping 2^24-2 usable host addresses on a network segment

Page 35: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Class B Address network.network.node.node For example, in the IP address 172.16.30.56, the network address is 172.16,

and the node address is 30.56

2^16 unique combinations. Class B network addresses should start with the binary digit 1, then 0. This leaves 14 bit positions to manipulate, therefore

16,384 (that is, 2^14) unique Class B network addresses We have 2^16 minus the two reserved patterns (all 0s and all 1s), for a

total of 65,534 possible node addresses for each Class B network.

Class B Valid Host IDs Here’s an example of how to find the valid hosts in a Class B network: All host bits turned off is the network address: 172.16.0.0. All host bits turned on is the broadcast address: 172.16.255.255. The valid hosts would be the numbers in between the network address and

the broadcast address: 172.16.0.1 through 172.16.255.254.

Page 36: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Network Address Range: Class B

In a Class B network, the RFCs state that the first bit of the first byte must always be turned on, but

the second bit must always be turned off. If you turn the other 6 bits all off and then all on, you will

find the range for a Class B network: 10000000 = 128 10111111 = 191As you can see, a Class B network is defined when the first byte is configured from 128 to

191.Network Address Range: Class CFor Class C networks, the RFCs define the first 2 bits of the first octet as always turned

on, butthe third bit can never be on. Following the same process as the previous classes,

convert frombinary to decimal to find the range. Here’s the range for a Class C network: 11000000 = 192 11011111 = 223 So, if you see an IP address that starts at 192 and goes to 223, you’ll know it is a Class

C IP address. Network Address Ranges: Classes D and E The addresses between 224 and 255 are reserved for Class D and E networks. Class

D (224–239) is used for multicast addresses and Class E (240–255) for scientific purposes,

Page 37: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Class C Addresses

network.network.network.node

Using the example IP address 192.168.100.102, the network address is 192.168.100, and the node address is 102.

In a Class C network address, the first three bit positions are always the binary 110. The calculation is: 3 bytes, or 24 bits, minus 3 reserved positions, leaves 21 positions. Hence, there are 2^21, or 2,097,152, possible Class C networks.

Each unique Class C network has one byte to use for node addresses. This leads to 2^8 or 256, minus the two reserved patterns of all 0s and all 1s, for a total of 254 node addresses for each Class C network.

Page 38: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Some IP addresses are reserved for special purposes, so network administrators can’t ever assign these addresses

to nodes. The table below lists the members of this exclusive little club and the reasons why they’re included in

it.

Page 39: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Private IP Addresses

Private IP Addresses These can be used on a private network, but they’re not routable

through the Internet also for the purpose of creating a measure of well-needed security and conveniently saves valuable IP address space.

A small no of routable IP addresses is used by a corporate organization and with the use of NAT many host can use the address(es) to reach the internet

Page 40: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Subnet and MaskThe introduction of subnet increases the number of networks,

which is realized by reducing the number of hosts. A mask is a 32-bit numeral consisting of consecutive 1s and consecutive 0s. It implements bit by bit “and” operation with the IP address, acting as a screen. Bits of 1 in the mask will not be screened off and will remain unchanged; For bits of 0, the difference of the host address will be screened off, thus the same network address will be obtained in a network.

For example, a class A address can be changed to a class C address by the following means. Such class C addresses constitute a subnet::

IP address: 120. 118. 100. 86 Subnet mask: 255. 255. 255. 0

Page 41: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Subnet and Mask As described above, we can conclude that there the

number of the host addresses that can be distributed in a network is more than 16,000,000 for class A addresses. While in the actual networks, this mode is not reasonable as no network is so big to hold so many hosts. This case also exists in class B addresses and class C addresses. A network, therefore, must be fractionalized to improve effectiveness of IP addresses and ease the management of them.

Subnets are the actual embodiment of this idea. They are the small networks in a big network.

The concepts of Subnet and Subnet Mask can help us plan IP addresses of a network.

Page 42: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Troubleshooting IP AddressTroubleshooting IP addressing is obviously important as

“trouble” occurs in IP Networks and you must be able to determine and fix a

problem on an IP network whether you’re at work or at home..

Assume one of the network nodes cannot communicate with say Network Management server or another nodes which just happens to be on a remote network or perhaps your Laptop could not connect to the internet.

Here are 4 steps you should employ

1. Open a DOS window and ping 127.0.0.1. This is the diagnostic or loopback address, and if you get a successful ping, your IP stack is then considered to be initialized. If it fails, then

you have an IP stack failure and need to reinstall TCP/IP on the host.

Page 43: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

2. From the DOS window, ping the IP address of the local host. If that’s successful, then your Network Interface Card (NIC) card is functioning. If it fails, then there is a problem with the NIC card. This doesn’t mean that a cable is plugged into the NIC, only that the IP protocol stack on the host can communicate to the NIC.

3. From the DOS window, ping the default gateway (router). If the ping works, it means that the NIC is plugged into the network and can communicate on the local network. If it fails, then you have a local physical network problem that could be happening anywhere from the NIC to the router.

4. If steps 1 through 3 were successful, try to ping the remote server. If that works, then you know that you have IP communication between the local host and the remote server. You also know that the remote physical network is working.

Page 44: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Network Protocols IPARPRARPICMPProtocol application

Page 45: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

ARP Protocol

ARP——Address Resolution Protocol, ARP implements the conversion from IP addresses to MAC addresses (Medium Access Control).

MAC address – A 48-bit binary address, usually appears as a 12-digit hexadecimal number, like 00e0fc012345. Each network device has a globally unique MAC address.

Applicable to LANs. The communications among hosts within a LAN must

be implemented through the MAC address.

Page 46: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

ARP Protocol

MAC headerFF. FF .FF. FF. FF. FF 08. 02. 80. 65. 63. 09

IP header189.110.58.69 189.110. 67. 56

ARP request message: What is your MAC address?

The process for the host 189.110.67.56 to search the host 189.110.58.69 to obtain the MAC address is as follows:

MAC header08. 02. 80. 65. 63. 09 05 23. 88. 57. 03. 44

IP header189.110. 67. 56 189. 110. 58. 69ARP reply message: This is my MAC address

The host 189.110.67.56 sends a broadcast message

The host 189.110.58.69 responses to the message

Page 47: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Network Protocols IPARPRARPICMPProtocol application

Page 48: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

RARP

RARP - Reverse Address Resolution Protocol Compared with ARP, RARP works just in the opposite

way: RARP obtains an IP address through the MAC address. In communications, many hosts do not have an IP address during initialization, and, in this case, the RARP protocol must be used to obtain the IP address.

For example: No-disk workstation; when the computer is configured to obtain IP address automatically.

Page 49: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Network Protocols IPARPRARPICMPProtocol application

Page 50: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

ICMP

ICPM - Internet Control Message Protocol It allows hosts or routers to report errors and

exceptions.

Page 51: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

ICMP Protocol

Relation between ICMP message and IP packet

IP packet header IP packet data

ICMP message

I P packet

Page 52: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

ICMP

ICMP application: Error messages--messages mainly used to carry

changed routes informationInquiry messages :

ICMP Echo request message ICMP Echo reply message

Page 53: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Network Protocols IPARPRARPICMPProtocol application

Page 54: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Network Layer Protocol Application

The PING command uses ICMP to know whether the communication with the peer host is normal.

Under DOS mode, ARP –A is used to obtain the corresponding relation between an IP address and a MAC address.

Page 55: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

TCP / IP Utilities

Ping: Ping gives echo response which could be successful, unreachable.. Traceroute: Shows the path to a target network displaying the hops. Ping can reveal there is a network problem but cant help to resolve it,traceroute can be used to identify where the problem is

Ipconfig: used to assign TCP/IP configuration parameters to certain network interfaces.

Address Resolution Protocol (ARP):ARP allows a TCP/IP system to change IP addresses to the MAC addresses, which the data-link protocol uses.

Netstat: Shows the info about a TCP/IP system's network connection

Page 56: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Nbtstat : Shows the information about the NetBIOS over the TCP/IP connections the Windows use to communicate over the LAN.

For the above Utilities, they all have associated options like ping {ip address –t }. Find out on the dos prompt how to see their associated list of options

TCP/IP Utilities

Page 57: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

TELECOMMUNICATIONS NETWORK PROTOCOL (TELNET)

Telnet command line gives control capabilities for systems on a network.

A user that is running a Telnet client program is able to connect to another Telnet

system. Telnet was actually programmed for a UNIX system. You will only get a

Telnet server on a Windows 2000 system. Telnet is used to remotely log on to a server

say for configuration or troubleshooting purposes. Telnet operates on TCP port 23.

Telnet connection is not secured.

Thus Secure shell (ssh) was developed. Putty is a typical ssh client.

Page 58: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

About this Session Section 1 TCP/IP Architecture and Implementation

Section 2 Link Layer Protocols

Section 3 Network Layer Protocols

Section 4 Transport layer protocols

Section 5 IP Routing

Page 59: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Transport Layer Protocols Functions of transport layer protocols:

The link layer is responsible for encapsulation and transmission of data, and the network layer implements IP packet routing, etc. However, for data communications mainly based on computers, some problems, like flow control and reliability, must be solved before the communications can be realized. These functions are implemented in the transport layer.

Page 60: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Transport Layer Protocols

TCPUDP

Page 61: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

TCP

TCP——Transfer Control Protocol.TCP has the following three functions:

Flow control: It implements flow control via slide window; Reliability: It realizes reliability through sequence

number and acknowledgement mechanism; It indicates the upper layer application by port number so

as to hand the data to the corresponding application program to process.

Page 62: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

TCP

Source/Destination port numbers :

Port numbers are used to identify upper layer protocols. Different applications have different port numbers, so that the request and received data can be processed by corresponding applications.

Port numbers are divided into source port number and destination port number, which are not necessarily the same in communications.

By means of combining port numbers with IP addresses, different applications at different places can be uniquely identified within the whole network; in a host, it is determined through the port numbers of TCP (or UDP) to which application program a message should be submitted.

Page 63: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

TCP

TCP and UDP port numbers are divided into the following three classes:

The port numbers with the values smaller than 255 are used for common applications, for example, FTP, Telnet, SMTP and HTTP use ports 21, 23, 25 and 80 respectively.

255~1023 are allocated to companies. 1024 and its larger values are not defined yet.

Page 64: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Transport Layer Protocols

TCPUDP

Page 65: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

UDP

UDP——User Datagram Protocol .UDP does not require data buffering during

transmission and does not involve connection management. Under the UDP mode, Valid arrival of messages can be ensured by timeout retry mechanism of application program.

Page 66: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

UDP Protocol

Source port number Destination port number

UDPMessage length Checksum

Data of variable lengths

Bit0 15 31

Page 67: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

UDP

Comparison between TCP and UDP: TCP is a connection-oriented reliable transport protocol UDP is connectionless unreliable transport protocol TCP is complicated while UDP is simple UDP is applicable to the communication transmission

with high real-time requirement (for example, voice communication), while the real-time feature of TCP is not as good as that of UDP due to large overhead

Page 68: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Application of TCP and UDP

TCP and UDP are designed for application programs of different characteristics. Among common programs, SMTP, FTP and Telnet adopt TCP, while DNS, SNMP and multicast adopt UDP.

Page 69: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

About this Session Section 1 TCP/IP Architecture and Implementation

Section 2 Link Layer Protocols

Section 3 Network Layer Protocols

Section 4 Transport layer protocols

Section 5 IP Routing

Page 70: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

IP routing

那一个通道 ?Which channel?A B

The important role of the network layer is searching path, that is, forwarding a data packet to the destination host according to the destination IP address

The equipment to implement this is a router

Page 71: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Characteristics and Roles of a Router

A router must meet the following requirements: It must have two or more network layer interfaces, used

for connection of different networks; The protocol must be realized to the network layer.

A router has the following two function: Generating routing tables Forwarding data packets to other networks

Page 72: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Examples of Router Connection

RouterA

RouterB

Interface address61.1.1.1

Interface address129.6.0.1

Interface address129.6.69.107

Interface address202.6.6.1

Subnet61.1.1.1/8

Subnet129.6.0.0/16

Subnet202.6.6.0/24

Page 73: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Routing Table in Router A

Destinationnetwork address

Destinationnetwork mask Next Hop Egress interface

202.6.6.0 255.255.255.0129.6.0.1 129.6.69.107

129.6.0.0 255.255.0.0129.6.69.107129.6.69.107

61.0.0.0 255.0.0.0 61.1.1.1 61.1.1.1

Page 74: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Routing Table in Router B

202.6.6.0 255.255.255.0 202.6.6.1 202.6.6.1

129.6.0.0 255.255.0.0 129.6.0.1 129.6.0.1

61.0.0.0 255.0.0.0 129.6.69.107 129.6.0.1

Destinationnetwork address

Destinationnetwork mask Next Hop Egress interface

Page 75: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Generating Modes of Routing Tables

Supporting static routing The routing information is inputted by operation personnel e

ntry by entry Dynamic routing

Routing table items are generated by routing protocols The common routing protocols include OSPF protocol and Ro

uting Information Protocol (RIP).

Page 76: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Working Flow of a Router

LAN2

IPETH PPP

Ethernetinterface

Serialinterface

IPETHPPP

LAN1 WAN

Router Router

Route selectionprotocolconversion

Protocolencapsulation

Sending Transmission Receiving

Protocoldecapsulation Serialinterface

Ethernetinterface

Page 77: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Summary

Corresponding to the standard 7-layer model of OSI, the TCP/IP suite includes four layers: Link layer, network layer, transport layer and application layer.

The role of the link layer is to ensure reliable and correct transmission of message information.

The network layer and the transport layer are the key points of this lesson. The classification method of IP addresses and the segmentation method of subnets, the roles of TCP and UDP and the application method of ports must be mastered.

A router is used to determine the path for packet transmission. Routing protocols are complicated, and trainees are just required to understand their functions.

Page 78: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal

Router Configuration Practice with reference to Cisco Router will be done using an Open source Cisco Router Emulating Software Dynamips/Dynagen

Page 79: IP Networks

Confidential Information of Huawei. No Spreading without Permission.

Security Level: Internal