Compiled by: Jayakumar Balasubramanian Web:  http://www.jwritings.com Email:  [email_address]
Introduction to IP The concept of ‘unreliability’ Datagram delivery from source to destination Creates a ‘virtual path’ and forms the basis of packet switching Takes the optimal/shortest path Learn the network topology and perform ‘routing’ functionality Independent of data link layer technology
Recap of addressing
The IP address Logical address 32 bit length IP address parts: Network part Host part Multiple classes Class A Class B Class C Special class The ‘heart’ of routing
Subnet mask The subnet mask is used to get the network portion of the IP address. This is basically achieved by performing logical AND. By looking into the subnet mask we can determine the class of the IP address. The concept of ‘subnetting’
Example
The concept of ‘routing’
Some more concepts Route types: Network specific route Host specific route Default route Type of protocols Routing protocols (Ex) OSPF, BGP Routed protocols (Ex) TCP, DNS, SNMP Data link layer  Maximum Transfer Unit (MTU) Segmentation and re-assembly (SAR)
Special class of IP addresses Broadcast Address Multicast Address Loop back Address
The concept of Multicasting Have you used Yahoo/Google groups? Instead of sending a separate copy of the data for each recipient, the source ends the data only once.  Unicast does mass mailings; Multicast does chain letters. Advantages: Cost-efficient Timely distribution of data Reduces WAN traffic
Multicast IP addresses The IP address belongs to ‘Class D’ Ranges from 224.0.0.0 to 239.255.255.255 Each address corresponds to a particular group/pre-defined protocol. 224.0.0.1 is for “All-hosts-in-LAN”
Sockets and multicasting options The ‘setsockopt’ API: setsockopt (int sockFd, int level, int optname, const void* optval, socklen_t optlen); level :  IPPROTO_IP opt-name: IP_ADD_MEMBERSHIP IP_DROP_MEMBERSHIP
struct ip_mreq struct ip_mreq { struct in_addr imr_multiaddr; struct in_addr imr_interface; };
The ‘xinetd’ daemon The ‘xinetd’ is a replacement for ‘inetd’, the internet services daemon. Each internet services are categorized based on port number. The daemons in Linux are started when the system is booting up. Basically all standard  servers (Telnet, FTP, SSH, etc..) are started in the similar way. Our idea is to make our server program as a daemon and try out some things.
Some basics The syntax of ‘select()’ and brush up. Standard socket descriptors: STDIN and STDOUT. Linux specific: The /etc directory The *.conf files in Linux
The /etc/services file Defines the sockets and protocols used for Internet services.  Each service is listed on a single line corresponding to the form: Syntax: ServiceName PortNumber/ProtocolName  Aliases ServiceName  -  Specifies an official Internet service  PortNumber  -  Specifies the socket port number user  ProtocolName  -  Specifies the transport protocol used  Aliases  -  Specifies a list of unofficial service names.
Example echo          7/tcp  echo          7/udp discard       9/tcp        sink null discard       9/udp       sink null daytime      13/tcp  daytime      13/udp chargen      19/tcp       ttytst source chargen      19/udp      ttytst source ftp            21/tcp time           37/tcp      timeserver
The /etc/xinetd.conf file xinetd.conf  is the configuration file that determines the services provided by  xinetd .  Any line whose first non-white-space character is a '#' is considered a comment line. Empty lines are ignored.  Each entry defines a service identified by the  service_name.   This is where the service specific details are provided.
Syntax and Example service <service_name> {  <attribute> <assign_op> <value> <value> ...  ... } service SMTP {  socket type  = stream protocol   =  tcp wait =  no user =  mail server =  /usr/sbin/exim }
Inside your program Important points: Use ‘select’ and STDIN combination for receiving client requests. Use STDOUT for sending the data out to clients. Restarting the ‘xinetd’  /etc/init.d/xinetd restart
Web  :  http://www.jwritings.com Email:  [email_address]

More Related Content

PPT
Socket Programming
PPTX
Client server examples for tcp abnormal conditions
PPTX
Transport layer interface
PPT
Md13 networking
PPTX
PDF
Python network programming
PPT
Socket Programming Tutorial
Socket Programming
Client server examples for tcp abnormal conditions
Transport layer interface
Md13 networking
Python network programming
Socket Programming Tutorial

What's hot (20)

PPTX
10. tcp ip and do d model
PDF
PPT
Sockets
PDF
PPT
Java API: java.net.InetAddress
PPTX
Basics of sockets
PPTX
Elementary TCP Sockets
PPT
Np unit2
PDF
Socket programming-in-python
PPT
Socket programming
PPTX
Advance Java-Network Programming
PDF
Ip header
PPT
A Short Java Socket Tutorial
PPT
Java Socket Programming
PDF
Socket programming using java
PPTX
Tcp header/IP Header/Authentication header
PDF
IP Datagram Structure
PPTX
Network Socket Programming with JAVA
PPTX
Socket Programming
PPTX
Part 12 : Local Area Networks
10. tcp ip and do d model
Sockets
Java API: java.net.InetAddress
Basics of sockets
Elementary TCP Sockets
Np unit2
Socket programming-in-python
Socket programming
Advance Java-Network Programming
Ip header
A Short Java Socket Tutorial
Java Socket Programming
Socket programming using java
Tcp header/IP Header/Authentication header
IP Datagram Structure
Network Socket Programming with JAVA
Socket Programming
Part 12 : Local Area Networks
Ad

Similar to Networking chapter VI (20)

PPT
Session 2 Tp 2
PPT
ch03.f=ssffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff...
PPTX
16.) layer 3 (basic tcp ip routing)
PPT
Basic socket programming
PPT
TCP Model
PPT
Tcp
PPT
Unit 8 Java
PPT
Application Layer and Socket Programming
PPTX
Internet protocol (ip) ppt
PPTX
Introduction to IP
PPTX
TCP/IP Protocol Architeture
PPT
Chapter2ccna
PPT
Chapter2ccna
PPT
lecture-2-tcp-ip.ppt
PPT
Hardware9
PPT
IP Utilites
PPT
TCP/IP Basics
PPTX
Chapter_6_ Network Layer.pptx
PPT
Training Day Slides
Session 2 Tp 2
ch03.f=ssffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff...
16.) layer 3 (basic tcp ip routing)
Basic socket programming
TCP Model
Tcp
Unit 8 Java
Application Layer and Socket Programming
Internet protocol (ip) ppt
Introduction to IP
TCP/IP Protocol Architeture
Chapter2ccna
Chapter2ccna
lecture-2-tcp-ip.ppt
Hardware9
IP Utilites
TCP/IP Basics
Chapter_6_ Network Layer.pptx
Training Day Slides
Ad

More from Jayakumar Balasubramanian (12)

PDF
Vegetation of Uttarakhand
PPTX
PPT
Networking chapter VII
PPT
Networking chapter V
PPT
Networking chapter IV
PPT
Networking chapter III
PPT
Networking chapter II
PPT
ATM Networks - Part I
PPTX
Emotional Intelligence
PPTX
MBTI type indicator
PPT
Performance management primer
PPT
Innovating for emerging markets
Vegetation of Uttarakhand
Networking chapter VII
Networking chapter V
Networking chapter IV
Networking chapter III
Networking chapter II
ATM Networks - Part I
Emotional Intelligence
MBTI type indicator
Performance management primer
Innovating for emerging markets

Recently uploaded (20)

PDF
4 layer Arch & Reference Arch of IoT.pdf
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Comparative analysis of machine learning models for fake news detection in so...
PPTX
Configure Apache Mutual Authentication
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PPTX
Build Your First AI Agent with UiPath.pptx
PDF
CloudStack 4.21: First Look Webinar slides
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
The influence of sentiment analysis in enhancing early warning system model f...
DOCX
search engine optimization ppt fir known well about this
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
4 layer Arch & Reference Arch of IoT.pdf
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
OpenACC and Open Hackathons Monthly Highlights July 2025
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
sustainability-14-14877-v2.pddhzftheheeeee
Consumable AI The What, Why & How for Small Teams.pdf
A review of recent deep learning applications in wood surface defect identifi...
Comparative analysis of machine learning models for fake news detection in so...
Configure Apache Mutual Authentication
sbt 2.0: go big (Scala Days 2025 edition)
Build Your First AI Agent with UiPath.pptx
CloudStack 4.21: First Look Webinar slides
Enhancing plagiarism detection using data pre-processing and machine learning...
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
Improvisation in detection of pomegranate leaf disease using transfer learni...
The influence of sentiment analysis in enhancing early warning system model f...
search engine optimization ppt fir known well about this
NewMind AI Weekly Chronicles – August ’25 Week III
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
Taming the Chaos: How to Turn Unstructured Data into Decisions

Networking chapter VI

  • 1. Compiled by: Jayakumar Balasubramanian Web: http://www.jwritings.com Email: [email_address]
  • 2. Introduction to IP The concept of ‘unreliability’ Datagram delivery from source to destination Creates a ‘virtual path’ and forms the basis of packet switching Takes the optimal/shortest path Learn the network topology and perform ‘routing’ functionality Independent of data link layer technology
  • 4. The IP address Logical address 32 bit length IP address parts: Network part Host part Multiple classes Class A Class B Class C Special class The ‘heart’ of routing
  • 5. Subnet mask The subnet mask is used to get the network portion of the IP address. This is basically achieved by performing logical AND. By looking into the subnet mask we can determine the class of the IP address. The concept of ‘subnetting’
  • 7. The concept of ‘routing’
  • 8. Some more concepts Route types: Network specific route Host specific route Default route Type of protocols Routing protocols (Ex) OSPF, BGP Routed protocols (Ex) TCP, DNS, SNMP Data link layer Maximum Transfer Unit (MTU) Segmentation and re-assembly (SAR)
  • 9. Special class of IP addresses Broadcast Address Multicast Address Loop back Address
  • 10. The concept of Multicasting Have you used Yahoo/Google groups? Instead of sending a separate copy of the data for each recipient, the source ends the data only once. Unicast does mass mailings; Multicast does chain letters. Advantages: Cost-efficient Timely distribution of data Reduces WAN traffic
  • 11. Multicast IP addresses The IP address belongs to ‘Class D’ Ranges from 224.0.0.0 to 239.255.255.255 Each address corresponds to a particular group/pre-defined protocol. 224.0.0.1 is for “All-hosts-in-LAN”
  • 12. Sockets and multicasting options The ‘setsockopt’ API: setsockopt (int sockFd, int level, int optname, const void* optval, socklen_t optlen); level : IPPROTO_IP opt-name: IP_ADD_MEMBERSHIP IP_DROP_MEMBERSHIP
  • 13. struct ip_mreq struct ip_mreq { struct in_addr imr_multiaddr; struct in_addr imr_interface; };
  • 14. The ‘xinetd’ daemon The ‘xinetd’ is a replacement for ‘inetd’, the internet services daemon. Each internet services are categorized based on port number. The daemons in Linux are started when the system is booting up. Basically all standard servers (Telnet, FTP, SSH, etc..) are started in the similar way. Our idea is to make our server program as a daemon and try out some things.
  • 15. Some basics The syntax of ‘select()’ and brush up. Standard socket descriptors: STDIN and STDOUT. Linux specific: The /etc directory The *.conf files in Linux
  • 16. The /etc/services file Defines the sockets and protocols used for Internet services. Each service is listed on a single line corresponding to the form: Syntax: ServiceName PortNumber/ProtocolName  Aliases ServiceName - Specifies an official Internet service PortNumber - Specifies the socket port number user ProtocolName - Specifies the transport protocol used Aliases - Specifies a list of unofficial service names.
  • 17. Example echo          7/tcp echo          7/udp discard       9/tcp       sink null discard       9/udp       sink null daytime      13/tcp daytime      13/udp chargen      19/tcp       ttytst source chargen      19/udp      ttytst source ftp           21/tcp time          37/tcp      timeserver
  • 18. The /etc/xinetd.conf file xinetd.conf is the configuration file that determines the services provided by xinetd . Any line whose first non-white-space character is a '#' is considered a comment line. Empty lines are ignored. Each entry defines a service identified by the service_name. This is where the service specific details are provided.
  • 19. Syntax and Example service <service_name> { <attribute> <assign_op> <value> <value> ... ... } service SMTP { socket type = stream protocol = tcp wait = no user = mail server = /usr/sbin/exim }
  • 20. Inside your program Important points: Use ‘select’ and STDIN combination for receiving client requests. Use STDOUT for sending the data out to clients. Restarting the ‘xinetd’ /etc/init.d/xinetd restart
  • 21. Web : http://www.jwritings.com Email: [email_address]