• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Networking in Gnu/Linux
 

Networking in Gnu/Linux

on

  • 3,025 views

 

Statistics

Views

Total Views
3,025
Views on SlideShare
2,990
Embed Views
35

Actions

Likes
1
Downloads
79
Comments
1

4 Embeds 35

http://eglug.org 16
http://www.slideshare.net 10
http://www.eglug.org 7
http://www.linkedin.com 2

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • thanks
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Networking in Gnu/Linux Networking in Gnu/Linux Presentation Transcript

    • Networking for GNU/Linux
        Ahmed D. Mekkawy AKA linuxawy [email_address]
    • Part I : TCP/IP overview
      • Though you should already know TCP/IP, this quick overview Is made to make sure that all course attendees are aligned.
    • OSI Model Vs. TCP/IP Model
    • TCP/IP Connection Types
      • TCP: Connection Oriented
        • Initiating a connection: 3 Way Handshaking
        • Finalizing a connection.
      • UDP: Connectionless
      • ICMP: Error, Control, Information.
    • Ports
      • Lower numbered Vs. Higher numbered ports.
      • Ports can handle multi-connection.
      • Listening Ports.
    • TTL
      • Time To Live.
      • Decreased by 1 with each router passed.
      • Designed to forbid packets to flow endlessly because of a mis-configured router or so.
    • IP
      • IPv4 Vs. IPv6
      • Private IPs (eg. 192.168.xxx.xxx , 10.xxx.xxx.xxx)
      • Localhost (127.xxx.xxx.xxx)
      • Subnets & netmask.
      • Network & Broadcast IP.
    • Gateways
      • Routing.
      • Natting.
      • Port-Forwarding.
      • Firewalling.
    • Hub Vs. Switch
      • Switch Vs. Hub
      • Switch Vs. Router
      • Access Points, are they Switches or Hubs?
    • Main Network Services
      • DNS
      • DHCP
    • Part II: Configure wired NIC
    • The Native way
      • ifconfig eth0 10.0.0.1 netmask 255.255.255.0 up
      • Ifup & ifdown
      • Multiple Ips on the same NIC: Child interfaces:
        • Ifconfig eth0:0 10.0.0.2 netmask 255.255.255.0 up
      • Routing:
        • route add default gw 192.168.0.1 eth0
        • route add -net 10.0.0.1 netmask 255.0.0.0 gw 192.168.0.200 eth0
      • DHCP client: dhclient eth0
    • The native way - Contd.
      • hostname
      • /etc/resolv.conf
      • /etc/hosts
    • The Redhat/Fedora way
      • /etc/sysconfig/network-scripts/ifcfg-eth0
      • Or
      # File: ifcfg-eth0 DEVICE=eth0 IPADDR=192.168.1.100 NETMASK=255.255.255.0 BOOTPROTO=static ONBOOT=yes # The following settings are optional BROADCAST=192.168.1.255 NETWORK=192.168.1.0 # File: ifcfg-eth0 DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes
    • Redhat way - Contd.
      • /etc/sysconfig/network
      • Static routes can be added per NIC:
      NETWORKING=yes HOSTNAME=bigboy GATEWAY=192.168.1.1 # File /etc/sysconfig/network-scripts/route-wlan0 # 10.0.0.0/8 via 192.168.1.254
    • Debian / Ubuntu way
      • /etc/network/interfaces
      # File: /etc/network/interfaces # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth1 iface eth1 inet static address 216.10.119.240 netmask 255.255.255.224 network 216.10.119.224 broadcast 216.10.119.255 gateway 216.10.119.241 # dns-* options are implemented by the resolvconf dns-nameservers 216.10.119.241 up route add -net 10.0.0.0 netmask 255.0.0.0 gw 216.10.119.225 eth1
    • Debian / Ubuntu way - Contd.
      • /etc/network/interfaces Contd
      • /etc/hostname
      auto eth1:1 iface eth1:1 inet static address 216.10.119.239 netmask 255.255.255.224 # The secondary network interface auto eth0 iface eth0 inet dhcp
    • Part III: Configuring wireless
    • Wireless Network
      • ls /sys/classes/net
      • ls /sys/classes/net/eth1 (look for “wireless”)
      • iwlist eth1 scan
      • Ifconfig eth1 0.0.0.0 up
      • iwconfig eth1 mode Managed
      • iwconfig eth1 channel 6
      • Iwconfig eth1 key restricted s:MyKey # for WEP
    • Wireless Network - Contd.
      • If the encryption is WAP:
        • Ifconfig eth1 0.0.0.0 up
        • Killall wpa_supplicant
        • wpa_passphrase linksys mysecret > /etc/wpa_supplicant.conf
        • Iwconfig eth1 mode Managed
        • Iwconfig eth1 essid linksys
        • Iwconfig eth1 channel 11
        • wpa_supplicant -i eth1 -c /etc/wpa_supplicant.conf -d -D wext &
    • Wireless Network - Contd.
      • Then get the IP normally through dhcp or through ifconfig command.
      • dhclient eth1
    • Reference
      • http://www.linuxhomenetworking.com
      • linuxac.org Magazine Jan, 2008