Introduction to Linux Networking in Linux. Internet In 1970's, DARPA (Defence Advanced Research Projects Agency) wanted something to link their computers.

Slides:



Advertisements
Similar presentations
Module 4: Configuring a Client for Name Resolution
Advertisements

1 Network Address Translation (NAT) Relates to Lab 7. Module about private networks and NAT.
IP Routing.
Static Routing Exercise AFNOG 2003/ Track 2 # 1 Static Routing Exercise u Unix network interface configuration u Cisco network interface configuration.
IPv6 – IPv4 Network Address, Port & Protocol Translation & Multithreaded DNS Gateway Navpreet Singh, Abhinav Singh, Udit Gupta, Vinay Bajpai, Toshu Malhotra.
CISCO NETWORKING ACADEMY Chabot College ELEC Address Resolution Protocol.
DHCP -Ameeta and Haripriya -cmsc 691x. DHCP ► Dynamic Host Configuration Protocol ► It controls vital networking parameters of hosts with the help of.
1 Dynamic DNS. 2 Module - Dynamic DNS ♦ Overview The domain names and IP addresses of hosts and the devices may change for many reasons. This module focuses.
SYSTEM ADMINISTRATION Chapter 19
Web Server Administration
Routing Basics By Craig Lindstrom. Overview Routing Process Routing Process Default Routing Default Routing Static Routing Static Routing Dynamic Routing.
Linux+ Guide to Linux Certification, Second Edition Chapter 14 Network Configuration.
Subnetting.
CCNA Guide to Cisco Networking Fundamentals Fourth Edition Chapter 9 Network Services.
TCP/IP Tools Lesson 5. Objectives Skills/ConceptsObjective Domain Description Objective Domain Number Using basic TCP/IP commands Understanding TCP/IP3.6.
Click to edit Master subtitle style Chapter 17: Troubleshooting Tools Instructor:
Chabot College ELEC Name Resolution.
Linux Networking Commands
IST 228\Ch3\IP Addressing1 TCP/IP and DoD Model (TCP/IP Model)
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 7 Connect the SUSE Linux Enterprise Server to the Network.
Chapter 12: Configuring Networks The Complete Guide to Linux System Administration.
Support Protocols and Technologies. Topics Filling in the gaps we need to make for IP forwarding work in practice – Getting IP addresses (DHCP) – Mapping.
Chapter Eleven An Introduction to TCP/IP. Objectives To compare TCP/IP’s layered structure to OSI To review the structure of an IP address To look at.
Interior Gateway Routing Protocol (IGRP) is a distance vector interior routing protocol (IGP) invented by Cisco. It is used by routers to exchange routing.
Day15 IP Space/Setup. IP Suite of protocols –TCP –UDP –ICMP –GRE… Gives us many benefits –Routing of packets over internet –Fragmentation/Reassembly of.
CN2668 Routers and Switches Kemtis Kunanuraksapong MSIS with Distinction MCTS, MCDST, MCP, A+
Name Resolution Domain Name System.
Network Layer – Subnetting and Control Protocols Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing,
Module 3: Configuring Basic TCP/IPv4 Settings. Overview of the TCP/IP Protocol Suite Overview of TCP/IP Addressing Name Resolution Dynamic IP Addressing.
ITS CSS Desktop Support Introduction to networking concepts Last updated: 9/30/2008 by pxahelp.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.1 ISP Services Working at a Small-to-Medium Business or ISP – Chapter 7.
DNS (Domain Name System) Protocol On the Internet, the DNS associates various sorts of information with domain names. A domain name is a meaningful and.
Routing and Routing Protocols Routing Protocols Overview.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols.
1 Routing. 2 Routing is the act of deciding how each individual datagram finds its way through the multiple different paths to its destination. Routing.
Examining TCP/IP.
COMT 6251 Network Layers COMT Overview IP and general Internet Operations Address Mapping ATM LANs Other network protocols.
Copyright © Lopamudra Roychoudhuri
Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking.
Networking Colin Alworth May 26, Quick Review IP address: four octets Broadcast addresses –IP addresses use all 1’s for the host bits, and whatever.
Links and LANs Link between two computers via cross cable The most simple way to connect two hosts is to link the two hosts with a cross cable.
Linux+ Guide to Linux Certification, Second Edition Chapter 14 Network Configuration.
Windows routing and resolution. Basic concepts  Host name: machine.sub-domain.domain example: mail.ubalt.edu same machine name in Windows in NetBIOS.
Day 14 Introduction to Networking. Unix Networking Unix is very frequently used as a server. –Server is a machine which “serves” some function Web Server.
Delivery, Forwarding, and Routing of IP Packets
1 TCP/IP Internetting ä Subnet layer ä Links stations on same subnet ä Often IEEE LAN standards ä PPP for telephone connections ä TCP/IP specifies.
1 TCP/IP Networking. 2 TCP/IP TCP/IP is the networking protocol suite most commonly used with UNIX, Windows, NT and most other OS’s. TCP/IP defines a.
2010 paro, bhutan IP Basics IP/ISP Services Workshop July, 2010 Paro, Bhutan.
IP network tools & troubleshooting AFCHIX 2010 Nairobi, Kenya October 2010.
Presented by Rebecca Meinhold But How Does the Internet Work?
1 TCP/IP Networking Yue Cui 06/13/02. 2 Presentation Outline Introduction Packets and Encapsulation IP Addresses, Routing ARP, DHCP and PPP Security Issue.
How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo
CSIT 220 (Blum)1 ARP Based on Computer Networks and Internets (Comer)
DNS DNS overview DNS operation DNS zones. DNS Overview Name to IP address lookup service based on Domain Names Some DNS servers hold name and address.
Sample DNS configurations. Example 1: Master 'master' DNS and is authoritative for this zone for example.com provides 'caching' services for all other.
How to use the Internet Ikjun Yeom. How to send a packet  buy a computer  make sure that the computer is equipped with a network interface card  find.
 RIP — A distance vector interior routing protocol  IGRP — The Cisco distance vector interior routing protocol (not used nowadays)  OSPF — A link-state.
Web Server Administration Chapter 4 Name Resolution.
(ITI310) By Eng. BASSEM ALSAID SESSIONS 9: Dynamic Host Configuration Protocol (DHCP)
Chapter 5. An IP address is simply a series of binary bits (ones and zeros). How many binary bits are used? 32.
Copyright © 2006 Heathkit Company, Inc. All Rights Reserved Introduction to Networking Technologies Dynamic Host Configuration Protocol (DHCP)
Chapter 4: server services. The Complete Guide to Linux System Administration2 Objectives Configure network interfaces using command- line and graphical.
Managing and Directing Network Traffic with Linux
Implementing TCP/IP.
LINUX ADMINISTRATION
IP network tools & troubleshooting
Working at a Small-to-Medium Business or ISP – Chapter 7
Working at a Small-to-Medium Business or ISP – Chapter 7
Working at a Small-to-Medium Business or ISP – Chapter 7
Module 12 Network Configuration
Presentation transcript:

Introduction to Linux Networking in Linux

Internet In 1970's, DARPA (Defence Advanced Research Projects Agency) wanted something to link their computers together. They chose BSD to implement the first internet, arpa net because if Unix's portability. Thus, all networking protocols nowadays are all based on the original BSD implementation of networking.

Basic networking In a networked environment, each computer has its own IP address and MAC address. There is also a subnet mask associated with the IP address. Basic routing is that when a computer receives an IP address that is not known, it passes it upstream to its router.

Simple Networking Setup

Setting up the network on Linux To assign an IP address to a computer, you use the ifconfig command. There are many options to ifconfig, typical parameters are: ifconfig IP netmask After assigning an IP address, the computer needs a default gateway so it can pass packets upstream. To add a default route, you use the route command: route add default IP

Hosts IP addresses are hard to remember. Who remebers the IP address to yahoo.com? So there is a hosts file all unix. Windows actually have this file too, but windows don't normally uses it because it uses NetBUI. An entry in /etc/hosts contains the following: IP Address (IPv4 or IPv6)alias domain

DNS and /etc/resolv.conf In Local Network, hosts files works fine, but on the internet, hosts files would not work. So DNS is created. In DNS, there is a DNS name server that resolves the IP address of a domain name. The file /etc/resolv.conf is responsible for DNS resolution in a workstation (non-server). Normally, /etc/hosts is querying a DNS server, however, that option may be changed. An entry in /etc/resolv.conf: nameserverIP address searchdomain

DHCP Assigning an IP address to each computer is not a feasible solution if clients are not always connected. DHCP or Dynamic Host Configuration Protocol is developed. Most Linux distributions is configured to automatically asks for an IP address from a DHCP server when it boots up. To asks for an IP address manually, you use the dhclient command: dhclient interface

More on routing To do routing with linux, the kernel usually needs to be recompiled with ip forwarding. But a loadable module may be loaded instead of recompile if the kernel supports loading additional modules. Benefits of using monolithic kernel is added security. Once ip forwarding is enabled, the machine can act as a basic router. Routed is the routing daemon.

Routing protocols Base installation of Unix supports the RIP protocol. (Routing Information Protocol) There are a few more protocols: IGRP (Interior Gateway Routing Protocol) EGP (Exterior Gateway Protocol) BGP (Border Gateway Protocol) To use the above routing protocols, third party programs will be needed: Zebra (GNU) Bgpd Gated Quagga (Told to be the best)

Netstat The command netstat show network statistics. (Note: different unixes shows different outputs) The options -r shows the routing table. -n shows numeric IPs instead of hosts. -i shows configured network interfaces. -t shows active TCP connections, -u for udp, -w for raw and -x for unix sockets. -a shows listening sockets.

Routing Table Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default UGS rl UH 1 6 lo /22 link#1 UC 0 0 rl :00:02:56:93:f0 UHLW 1 0 rl UGHS 0 0 lo0 Flags G – uses a gateway U – interface up H – only single host

Network statistics on connections Active Internet connections Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp fukakyon.ssh ESTABLISHED udp4 0 0 localhost localhost udp4 0 0 localhost localhost udp4 0 0 localhost.domain *.* udp4 0 0 fukakyon.domain *.*

Active Internet connections (including servers) Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp fukakyon.ssh ESTABLISHED tcp4 0 0 *.3128 *.* LISTEN tcp4 0 0 *.http *.* LISTEN tcp4 0 0 *.https *.* LISTEN tcp4 0 0 *.3127 *.* LISTEN tcp4 0 0 localhost.8005 *.* LISTEN tcp4 0 0 *.8009 *.* LISTEN tcp4 0 0 *.8008 *.* LISTEN tcp4 0 0 *.ftp *.* LISTEN tcp4 0 0 localhost *.* LISTEN tcp4 0 0 *.smtp *.* LISTEN tcp4 0 0 *.postgresql *.* LISTEN tcp4 0 0 *.3306 *.* LISTEN tcp4 0 0 *.3129 *.* LISTEN tcp4 0 0 *.imaps *.* LISTEN tcp4 0 0 *.imap *.* LISTEN tcp4 0 0 localhost *.* LISTEN tcp4 0 0 *.ssh *.* LISTEN tcp4 0 0 localhost.rndc *.* LISTEN tcp4 0 0 localhost.domain *.* LISTEN tcp4 0 0 fukakyon.domain *.* LISTEN

More on DNS DNS is Domain Name System. There are different types of records in DNS (Common types): A recordDirect address translation PTR recordIP->host translation MX recordMail Exchange record CNAME recordAlias of an A record

Types of quering for a DNS record When asking for a reply to a DNS query. (i.e. Asking for the IP address to yahoo.com), there are 2 types of queries: Recursive lookup(default) Non-recursive lookup In recursive lookup, when the reply to a query is not in a nameserver cache, that nameserver will ask another nameserver for the answer. That nameserver will then do the same thing if the reply is not in the cache. In recursive lookup, you will always get the IP address for a valid domain. In non-recursive lookup, if the reply is not in the cache, the nameserver will just return with a possible link to a nameserver that might have the reply.

Example replies Say we search for the IP address of gpro.com non-recursive: ; > DiG > +norecurse gpro.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: ;; flags: qr ra; QUERY: 1, ANSWER: 0, AUTHORITY: 13, ADDITIONAL: 14 ;; QUESTION SECTION: ;gpro.com. IN A ;; AUTHORITY SECTION: com IN NS M.GTLD-SERVERS.NET. com IN NS A.GTLD-SERVERS.NET. ;; ADDITIONAL SECTION: A.GTLD-SERVERS.NET IN A ;; Query time: 6 msec ;; SERVER: #53( ) ;; WHEN: Wed Mar 16 18:42: ;; MSG SIZE rcvd: 498

We are asked to query another server, which gives us the following: ; > DiG norecurse gpro.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: ;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 1 ;; QUESTION SECTION: ;gpro.com. IN A ;; AUTHORITY SECTION: gpro.com IN NS ns-tk022.ocn.ad.jp. gpro.com IN NS ns.gpro.com. ;; ADDITIONAL SECTION: ns.gpro.com IN A ;; Query time: 152 msec ;; SERVER: #53( ) ;; WHEN: Wed Mar 16 18:54: ;; MSG SIZE rcvd: 91

One more query and we get the answer: ; > DiG norecurse gpro.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: ;; flags: qr aa ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION SECTION: ;gpro.com. IN A ;; ANSWER SECTION: gpro.com IN A ;; AUTHORITY SECTION: gpro.com IN NS ns-tk022.ocn.ad.jp. gpro.com IN NS ns.gpro.com. ;; ADDITIONAL SECTION: ns-tk022.ocn.ad.jp IN A ns.gpro.com IN A ;; Query time: 306 msec ;; SERVER: #53( ) ;; WHEN: Wed Mar 16 18:55: ;; MSG SIZE rcvd: 123