You are on page 1of 10

July 2011 Master of Computer Application (MCA) Semester 6 MC0087 Internetworking with TCP/IP 4 Credits

(Book ID: B1008)

Assignment Set 1 (60 Marks)


Answer all Questions Each Question carries fifteen Marks 1. 5. Explain the following with respect to User Datagram Protocol (UDP): A) UDP Datagram Format B) UDP Application Programming Interface A) UDP Datagram Format
User Datagram Protocol (UDP) is a protocol used for transport of data across an Internet Protocol (IP) based network. User Datagram Protocol (UDP) does not perform handshaking as TCP does, or check for errors, or even to see if the transmitted data was received, so User Datagram Protocol (UDP) is referred to as an unreliable, connectionless protocol. However, because User Datagram Protocol (UDP) skips the handshaking and is focused on pure transmission, User Datagram Protocol (UDP) has lower overhead and is thus faster than TCP. UDP will provide better throughput on a network where the physical and data link layer protocols are reliable. Domain Name Service, Trivial File Transfer Protocol and Simple Network Management Protocol all use User Datagram Protocol (UDP). UDP DATAGRAM FORMAT A User Datagram Protocol (UDP) datagram 31 is encapsulated within an IP datagram and therefore is prefixed with IP header information. 0 7 8 15 16 23 24

+--------+--------+--------+--------+ | Source | Destination | | Port | Port | +--------+--------+--------+--------+ | | | | Length | Checksum | +--------+--------+--------+--------+ | | data octets ... +---------------- ...

UDP DATAGRAM FIELDS Source Port The source port is the virtual port number assigned by the local computer when it transmits data to a remote machine. This is typically a number above 1023 and is the next highest number not already in use. This field is not always used, but when it is, it should indicate the port number the remote machine should use when sending any replies back to the source.

Destination Port The destination port is usually a 'well known port number' of a service, such as 69 for Trivial File Transfer Protocol (TFTP), or 53 for Domain Name Service (DNS). These virtual numbers allow the remote machine to recognize a request for a particular type of service and to match up endpoints for multiplexed connections. When used with a source port, this allows a remote machine to recognize a data connection. Length Length is specified as a number of octets, and since it's a 16-bit value, it provides for a datagram of up to 65,535 bytes, including the UDP datagram header and data payload. Checksum A checksum is calculated using the the 16-bit one's complement of the one's complement sum of data pulled from the IP header, the User Datagram Protocol (UDP) header, and some of the data. This data is padded with zeroes so that it is a multiple of two octets before the checksum algorithm is run.

The purpose of UDP is to break up a stream of data into datagrams, add a source and destination port information, a length and a checksum. It is the receiving application's responsibility to detect and recover lost or damaged packets, as UDP doesn't take care of this.

IP. The networking layer protocol IP handles packet ordering, segmentation and re-assembly, as well as the routing between the source and destination computer
You can think of UDP as riding "inside" systems.

B) UDP Application Programming Interface

The application interface offered by UDP is described in RFC 768. It provides for:

The creation of new receive ports. Receive operation that returns the data bytes and an indication of source port and source IP address. Send operation that has as parameters the data, source and destination ports and addresses.

The way this should

be implemented is left to the discretion of each vendor.

Be aware that UDP and IP do not provide guaranteed delivery, flow-control or error recovery, so these must be provided by the application. Standard applications using UDP include: Trivial File Transfer Protocol (TFTP) Domain Name System (DNS) name server Remote Procedure Call (RPC), used by the Network File System (NFS) Network Computing System (NCS) Simple Network Management Protocol (SNMP)

2. Describe the following network interfaces: A) Ethernet and IEEE 802 LANs B) FDDI C) SLIP D) PPP A) Ethernet and IEEE 802 LANs
IEEE 802 refers to a family of IEEE standards dealing with local area networks and metropolitan area networks.

Page | 2

More specifically, the IEEE 802 standards are restricted to networks carrying variable-size packets. (By contrast, in cell relay networks data is transmitted in short, uniformly sized units called cells. Isochronous networks, where data is transmitted as a steady stream of octets, or groups of octets, at regular time intervals, are also out of the scope of this standard.) The number 802 was simply the next free number IEEE could assign,[1] though 802 is sometimes associated with the date the first meeting was held February 1980. The services and protocols specified in IEEE 802 map to the lower two layers (Data Link and Physical) of the sevenlayer OSI networking reference model. In fact, IEEE 802 splits the OSI Data Link Layer into two sub-layers named Logical Link Control (LLC) and Media Access Control (MAC), so that the layers can be listed like this:

Data link layer LLC Sub layer MAC Sub layer Physical layer

The IEEE 802 family of standards is maintained by the IEEE 802 LAN/MAN Standards Committee (LMSC). The most widely used standards are for the Ethernet family, Token Ring, Wireless LAN, Bridging and Virtual Bridged LANs. An individual Working Group provides the focus for each area.

B)FDDI

FDDI (Fiber Distributed Data Interface) is a set of ANSI and ISO standards for data transmission on fiber optic lines in a local area network (LAN) that can extend in range up to 200 km (124 miles). The FDDI protocol is based on the token ring protocol. In addition to being large geographically, an FDDI local area network Can support thousands of users. FDDI is frequently used on the backbone for a wide area network (WAN). An FDDI network contains two token rings, one for possible backup in case the primary ring fails. The primary ring offers up to 100 Mbps capacity. If the secondary ring is not needed for backup, it can also carry data, extending capacity to 200 Mbps. The single ring can extend the maximum distance; a dual ring can extend 100 km (62 miles). FDDI is a product of American National Standards Committee X3-T9 and conforms to the Open Systems Interconnection (OSI) model of functional layering. It can be used to interconnect LANs using other protocols. FDDI-II is a version of FDDI that adds the capability to add circuit-switched service to the network so that voice signals can also be handled. Work is underway to connect FDDI networks to the developing Synchronous Optical Network (SONET).
C) SLIP
The Serial Line Internet Protocol (SLIP) is an encapsulation of the Internet Protocol designed to work over serial ports and modem connections. It is documented in RFC 1055. On personal computers, SLIP has been largely replaced by the Point-to-Point Protocol (PPP), which is better engineered, has more features and does not require its IP address Networking Resources

Page | 3

configuration to be set before it is established. On microcontrollers, however, SLIP is still the preferred way of encapsulating IP packets due to its very small overhead. SLIP modifies a standard TCP/IP datagram by appending a special "SLIP END" character to it, which distinguishes datagram boundaries in the byte stream. SLIP requires a serial port configuration of 8 data bits, no parity, and either EIA hardware flow control, or CLOCAL mode (3-wire null-modem) UART operation settings. SLIP does not provide error detection, being reliant on upper layer protocols for this. Therefore SLIP on its own is not satisfactory over an error-prone dial-up connection. It is however still useful for testing operating systems' response capabilities under load (by looking at flood-pingstatistics). SLIP is also currently used in the Blue Core Serial Protocol for communication between Bluetooth modules and host computers.[1]

D) PPP
In networking, the Point-to-Point Protocol (PPP) is a data link protocol commonly used in establishing a direct connection between two networking nodes. It can provide connection authentication, transmission encryption, and compression. PPP is used over many types of physical networks including serial cable, phone line, line, cellular, specialized radio links, and fiber optic links such as SONET. PPP is also used over Internet access connections (now marketed as "broadband"). Internet service providers (ISPs) have used PPP for customer dial-up access to the Internet, since IP packets cannot be transmitted over a modem line on their own, without some data link protocol. Two encapsulated forms of PPP, Point-to-Point Protocol over Ethernet (Pope) and Point-to-Point Protocol over ATM (Poppa) are used most commonly by Internet Service Providers (ISPs) to establish digital (DSL) Internet service connection with customers. PPP is commonly used as a data link layer protocol for connection over synchronous and asynchronous circuits, where it has largely superseded the older Serial Line Internet Protocol(SLIP) and telephone company mandated standards (such as Link Access Protocol, Balanced(LAPB) in the X.25 protocol suite). PPP was designed to work with numerous layer protocols, including Internet Protocol (IP), TRILL, Novell's Internetwork Packet Exchange (IPX), NBF and AppleTalk.

3:- Differentiate between (a) Static and dynamic routing (b) Interior and exterior gateway routing protocols (a) Static and dynamic routing Difference between Static, Dynamic and Default Routing
There are two basic methods of building a routing table 1. Static Routing 2. Dynamic Routing

Page | 4

Static Routing: A static routing occurs when you manually add routes in each Routers Routing table, Routing table should create, maintain, and update by a network administrator, manually. A static route to every network must be configured on every router for full connectivity. This provides a granular level of control over routing, but quickly becomes impractical on large networks. Routers will not share static routes with each other, thus reducing CPU/RAM overhead and saving bandwidth. However, static routing is not fault-tolerant, as any change to the routing infrastructure (such as a link going down, or a new network added) requires manual intervention. Routers operating in a purely static environment cannot seamlessly choose a better Route if a link becomes unavailable. Static routes have an Administrative Distance (AD) of1, and thus are always preferred over dynamic routes, unless the default AD is changed. A static route with an adjusted AD is called a floating static route. The syntax for the global configuration command used to enter a static route is: ip route {destination prefix} {destination prefix mask} {Exit interface OR Next hop IP address} {Administrative Distance} {Permanent} The following briefly outlines the advantages and disadvantages of static routing: Advantages of Static Routing: Minimal CPU/Memory overhead There is no bandwidth update between Routers, which means you will save bandwidth on WAN links. It adds security because the administrator can choose Routing access to certain networks only. Disadvantages of Static Routing: If any Infrastructure changes must be manually adjust the configuration in complete network. No dynamic fault tolerance if a link goes down Administrator must understand the complete internetwork and how each Router connected to configure properly. Impractical on large network Dynamic Routing: A Dynamic Routing is when protocols are used to find networks and update Routing tables on Routers. A dynamic routing table is created, maintained, and updated by a routing protocol running on the router. Examples of routing protocols include RIP (Routing Information Protocol), EIGRP (Enhanced Interior Gateway Routing Protocol), and OSPF (Open Shortest Path First). Routers do share dynamic routing information with each other, which increases CPU, RAM, and bandwidth usage. However, routing protocols are capable of dynamically choosing a different (or better) path when there is a change to the routing infrastructure. Do not confuse routing protocols with routed protocols: A routed protocol is a Layer 3 protocol that applies logical addresses to devices and routes data between networks (such as IP) A routing protocol dynamically builds the network, topology, and next hop information in routing tables (such as RIP, EIGRP, etc.) The following briefly outlines the advantages and disadvantages of dynamic routing: Advantages of Dynamic Routing:

Page | 5

Simpler to configure on larger networks Will dynamically choose a different (or better) route if a link goes down Ability to load balance between multiple links Disadvantages of Dynamic Routing: Updates are shared between routers, thus consuming bandwidth Routing protocols put additional load on router CPU/RAM The choice of the best route is in the hands of the routing protocol, and not the network administrator.

(b) Interior and exterior gateway routing protocols (b) Interior and exterior gateway routing protocols
Interior vs. Exterior Routing Protocols Routing is the process of moving data from one network to another. Routing is unnecessary unless you have multiple networks on different address ranges different combinations of IP addresses and subnet masks, for example). If you don't, you need to look at bridging or switching. You don't need to run a routing protocol unless you have multiple networks served by more than one router (and even then, manual static routes are easier for small networks). Once you get beyond three routers, it's time to start thinking about dynamic routing protocols. If you are connecting your networks to the Internet, you will also need to think about running more than one kind of routing protocol. INTERIOR GATEWAY PROTOCOLS Interior Gateway Protocols (IGPs) handle routing within an Autonomous System (one routing domain). In plain English, IGP's figure out how to get from place to place between the routers you own. These dynamic routing protocols keep track of paths used to move data from one end system to another inside a network or set of networks that you administrate (all of the networks you manage combined are usually just one Autonomous System). IGP's are how you get all the networks communicating with each other. IGP's fall into two categories: Distance Vector Protocols Routing Information Protocol Link State Protocols Open Shortest Path First

(RIP) Interior Gateway Routing Protocol (IGRP) (OSPF) (IS-IS)

Intermediate System to Intermediate System EXTERIOR GATEWAY PROTOCOLS

To get from place to place outside your network(s), i.e. on the Internet, you must use an Exterior Gateway Protocol. Exterior Gateway Protocols handle routing outside an Autonomous System and get you from your network, through your Internet providers network and onto any other network. BGP is used by companies with more than one Internet provider to allow them to have redundancy and load balancing of their data transported to and from the Internet. Examples of an EGP: Border Gateway Protocol (BGP) Exterior Gateway Protocol (Replaced by BGP)

4. Describe the following with respect to Network Interfaces: a. Ethernet and IEEE 802 Local Area Networks (LANs) b. Fiber Distributed Data Interface (FDDI) c. Serial Line IP (SLIP)

Page | 6

d. Point-to-Point Protocol (PPP) a. Ethernet and IEEE 802 Local Area Networks (LANs)

Ethernet: IEEE 802.3 Local Area Network (LAN) protocols


Ethernet protocols refer to the family of local-area network (LAN) covered by the IEEE 802.3. In the Ethernet standard, there are two modes of operation: half-duplex and full-duplex modes. In the half duplex mode, data are transmitted using the popular Carrier-Sense Multiple Access/Collision Detection (CSMA/CD) protocol on a shared medium. The main disadvantages of the half-duplex are the efficiency and distance limitation, in which the link distance is limited by the minimum MAC frame size. This restriction reduces the efficiency drastically for high-rate transmission. Therefore, the carrier extension technique is used to ensure the minimum frame size of 512 bytes in Gigabit Ethernet to achieve a reasonable link distance. Four data rates are currently defined for operation over optical fiber and twisted-pair cables: 10 Mbps - 10Base-T Ethernet (IEEE 802.3)

100 Mbps - Fast Ethernet (IEEE 802.3u) 1000 Mbps - Gigabit Ethernet (IEEE 802.3z) 10-Gigabit - 10 Gaps Ethernet (IEEE 802.3ae).

In this document, we discuss the general aspects of the Ethernet. The specific issues regarding Fast Ethernet, Gigabit and 10 Gigabit Ethernet will be discussed in separate documents. The Ethernet system consists of three basic elements: 1. the physical medium used to carry Ethernet signals between computers, 2. a set of medium access control rules embedded in each Ethernet interface that allow multiple computers to fairly arbitrate access to the shared Ethernet channel, and 3. an Ethernet frame that consists of a standardized set of bits used to carry data over the system. As with all IEEE 802 protocols, the ISO data link layer is divided into two IEEE 802 sub layers, the Media Access Control (MAC) sub layer and the MAC-client sub layer. The IEEE 802.3 physical layer corresponds to the ISO physical layer. The MAC sub-layer has two primary responsibilities:

Data encapsulation, including frame assembly before transmission, and frame parsing/error detection during and after reception Media access control, including initiation of frame transmission and recovery from transmission failure

The MAC-client sub-layer may be one of the following: Logical Link Control (LLC), which provides the interface between the Ethernet MAC and the upper layers in the protocol stack of the end station. The LLC sub layer is defined by IEEE 802.2 standards. Bridge entity, which provides LAN-to-LAN interfaces between LANs that use the same protocol (for example, Ethernet to Ethernet) and also between different protocols (for example, Ethernet to Token Ring). Bridge entities are defined by IEEE 802.1 standards.

Each Ethernet-equipped computer operates independently of all other stations on the network: there is no central controller. All stations attached to an Ethernet are connected to a shared signaling system, also called the medium. To send data a station first listens to the channel, and when the channel is idle the station transmits its

Page | 7

data in the form of an Ethernet frame, or packet. After each frame transmission, all stations on the network must contend equally for the next frame transmission opportunity. Access to the shared channel is determined by the medium access control (MAC) mechanism embedded in the Ethernet interface located in each station. The medium access control mechanism is based on a system called Carrier Sense Multiple Access with Collision Detection (CSMA/CD). As each Ethernet frame is sent onto the shared signal channel, all Ethernet interfaces look at the destination address. If the destination address of the frame matches with the interface address, the frame will be read entirely and be delivered to the networking software running on that computer. All other network interfaces will stop reading the frame when they discover that the destination address does not match their own address. When it comes to how signals flow over the set of media segments that make up an Ethernet system, it helps to understand the topology of the system. The signal topology of the Ethernet is also known as the logical topology, to distinguish it from the actual physical layout of the media cables. The logical topology of an Ethernet provides a single channel (or bus) that carries Ethernet signals to all stations. Multiple Ethernet segments can be linked together to form a larger Ethernet LAN using a signal amplifying and retiming device called a repeater. Through the use of repeaters, a given Ethernet system of multiple segments can grow as a "nonrooted branching tree." Non-rooted" means that the resulting system of linked segments may grow in any direction, and does not have a specific root segment. Most importantly, segments must never be connected in a loop. Every segment in the system must have two ends, since the Ethernet system will not operate correctly in the presence of loop paths. Even though the media segments may be physically connected in a star pattern, with multiple segments attached to a repeater, the logical topology is still that of a single Ethernet channel that carries signals to all stations b. Fiber Distributed Data Interface (FDDI) Fiber Distributed Data Interface (FDDI) provides a 100 Mbit/s optical standard for data transmission in a local area network that can extend in range up to 200 kilometers (120 mi). Although FDDI logical topology is a ring-based token network, it does not use the IEEE 802.5token ring protocol as its basis; instead, its protocol is derived from the IEEE 802.4 bus timed token protocol. In addition to covering large geographical areas, FDDI local area networks can support thousands of users. As a standard underlying medium it uses optical fiber, although it can use copper cable, in which case it may be referred to as CDDI (Copper Distributed Data Interface). FDDI offers both a Dual-Attached Station (DAS), counter-rotating token ring topology and a Single-Attached Station (SAS), token bus passing ring topology. FDDI was considered an attractive campus backbone technology in the early to mid 1990s since existing Ethernet networks only offered 10 Mbit/s transfer speeds and Token Ring networks only offered 4 Mbit/s or 16 Mbit/s speeds. Thus it was the preferred choice of that era for a high-speed backbone, but FDDI has since been effectively obsolesced by fast Ethernet which offered the same 100 Mbit/s speeds, but at a much lower cost and, since 1998, by Gigabit Ethernet due to its speed, and even lower cost, and ubiquity.

Page | 8

FDDI, as a product of American National Standards Institute X3T9.5 (now X3T12), conforms to theOpen Systems Interconnection (OSI) model of functional layering of LANs using other protocols. FDDI-II, a version of FDDI, adds the capability to add circuit-switched service to the network so
that it can also handle voice and video signals. Work has started to connect FDDI networks to the developing Synchronous Optical Network (SONET). A FDDI network contains two rings, one as a secondary backup in case the primary ring fails. The primary ring offers up to 100 Mbit/s capacities. When a network has no requirement for the secondary ring to do backup, it can also carry data, extending capacity to 200 Mbit/s. The single ring can extend the maximum distance; a dual ring can extend 100 km (62 mi). FDDI has a larger maximum-frame size (4,352 bytes) than standard 100 Mbit/s Ethernet which only supports a maximum-frame size of 1,500 bytes, allowing better throughput. Designers normally construct FDDI rings in the form of a "dual ring of trees" (see network topology). A small number of devices (typically infrastructure devices such as routers and concentrators rather than host computers) connect to both rings - hence the term "dual-attached". Host computers then connect as single-attached devices to the routers or concentrators. The dual ring in its most degenerate form simply collapses into a single device. Typically, a computerroom contains the whole dual ring, although some implementations have deployed FDDI as a Metropolitan area network.

c. Serial Line IP (SLIP)


"SLIP" redirects here. For the list processing language, see SLIP (programming language). The Serial Line Internet Protocol (SLIP) is an encapsulation of the Internet Protocol designed to work over serial ports and modem connections. It is documented in RFC 1055. On personal computers, SLIP has been largely replaced by the Point-to-Point Protocol (PPP), which is better engineered, has more features and does not require its IP address configuration to be set before it is established. On microcontrollers, however, SLIP is still the preferred way of encapsulating IP packets due to its very small overhead. SLIP modifies a standard TCP/IP datagram by appending a special "SLIP END" character to it, which distinguishes datagram boundaries in the byte stream. SLIP requires a serial port configuration of 8 data bits, no parity, and either EIA hardware flow control, or CLOCAL mode (3-wire null-modem) UART operation settings. SLIP does not provide error detection, being reliant on upper layer protocols for this. Therefore SLIP on its own is not satisfactory over an error-prone dial-up connection. It is however still useful for testing operating systems' response capabilities under load (by looking at flood-pingstatistics). SLIP is also currently used in the BlueCore Serial Protocol for communication between Bluetooth modules and host computers.[1]

d. Point-to-Point Protocol (PPP)


In networking, the Point-to-Point Protocol (PPP) is a data link protocol commonly used in establishing a direct connection between two networking nodes. It can provide connectionauthentication, transmission encryption, and compression. PPP is used over many types of physical networks including serial cable, phone line, trunk line,cellular telephone, specialized radio links, and fiber optic links such as SONET. PPP is also used over Internet access connections (now marketed as "broadband"). Internet service providers(ISPs) have used PPP for customer dial-up access to the Internet, since IP packets cannot be transmitted over a modem line on their own, without some data link protocol. Two encapsulated forms of PPP, Point-to-Point Protocol over Ethernet (Pope) and Point-to-Point Protocol over

Page | 9

ATM (Poppa), are used most commonly by Internet Service Providers (ISPs) to establish aDigital Subscriber Line (DSL) Internet service connection with customers. PPP is commonly used as a data link layer protocol for connection over synchronous and asynchronous circuits, where it has largely superseded the older Serial Line Internet Protocol(SLIP) and telephone company mandated standards (such as Link Access Protocol, Balanced(LAPB) in the X.25 protocol suite). PPP was designed to work with numerous layer protocols, including Internet Protocol (IP), TRILL, Novell's Internetwork Packet Exchange (IPX), NBF and AppleTalk.

Page | 10

You might also like