linux basic networking

26
Author: az_joynare Linux Basic Linux Basic Networking Networking December, 29 th 2007

Upload: irvine-skeighter

Post on 02-Jul-2015

50 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Linux Basic Networking

Author: az_joynare

Linux Basic Linux BasicNetworkingNetworking

December, 29th 2007

Page 2: Linux Basic Networking

setting up netkitsetting up netkitdownload the three files that make up the download the three files that make up the distributiondistribution

  netkit­X.Y.tar.bz2netkit­X.Y.tar.bz2  netkit­filesystem­FX.Y.tar.bz2 (warning: >100MB)netkit­filesystem­FX.Y.tar.bz2 (warning: >100MB)  netkit­kernel­KX.Y.tar.bz2netkit­kernel­KX.Y.tar.bz2

  unpack them in the same locationunpack them in the same location  tar xjf netkit­X.Y.tar.bz2tar xjf netkit­X.Y.tar.bz2  tar xjf netkit­filesystem­FX.Y.tar.bz2 (this may take a while; tar xjf netkit­filesystem­FX.Y.tar.bz2 (this may take a while; warning: decompressed size exceeds 600MB)warning: decompressed size exceeds 600MB)  tar xjf netkit­kernel­KX.Y.tar.bz2tar xjf netkit­kernel­KX.Y.tar.bz2

Page 3: Linux Basic Networking

setting up netkit (2)setting up netkit (2)   configure your shell to set the following configure your shell to set the following 

environment variablesenvironment variables   NETKIT_HOME must be set to the directory containing NETKIT_HOME must be set to the directory containing 

the decompressed version of netkitthe decompressed version of netkit  “ “$NETKIT_HOME/bin” must be appended to the PATH$NETKIT_HOME/bin” must be appended to the PATH  “ “:$NETKIT_HOME/man” must be appended to the :$NETKIT_HOME/man” must be appended to the 

MANPATHMANPATH   for example (assuming bash is being used)for example (assuming bash is being used)

o   export NETKIT_HOME=~/netkit2export NETKIT_HOME=~/netkit2o   export PATH=$PATH:$NETKIT_HOME/binexport PATH=$PATH:$NETKIT_HOME/bino   export MANPATH=:$NETKIT_HOME/manexport MANPATH=:$NETKIT_HOME/man

Page 4: Linux Basic Networking

setting up netkit (3)setting up netkit (3)   you can check your configuration by 

entering the netkit directory… cd $NETKIT_HOME

 …and running the check_configuration.sh script  ./check_configuration.sh

 if all the checks succeed, then you are ready to use netkit

Page 5: Linux Basic Networking

netkit vcommandsnetkit vcommands   allow to startup virtual machines with 

arbitrary configurations (memory, network interfaces, etc.)   vstart: starts a new virtual machine  vlist: lists currently running virtual machines  vconfig: attaches network interfaces to running 

vms  vhalt: gracefully halts a virtual machine  vcrash: causes a virtual machine to crash  vclean: “panic command” to clean up all netkit 

processes (including vms) and configuration settingson the host machine

Page 6: Linux Basic Networking

netkit lcommandsnetkit lcommands   ease setting up complex labs consisting 

ofseveral virtual machines   lstart: starts a netkit lab  lhalt: gracefully halts all vms of a lab  lcrash: causes all the vms of a lab to crash  lclean: removes temporary files from a lab 

directory  linfo: provides information about a lab 

withoutstarting it  ltest: allows to run tests to check that the lab 

isworking properly

Page 7: Linux Basic Networking

Build Virtual MachineBuild Virtual Machine

Page 8: Linux Basic Networking

creating a virtual machine ­ 1

user@localhost:~$ vstart pc1 ­­eth0 = A

Nama PC

Tingkatan NIC

Nama Jaringan

Page 9: Linux Basic Networking

View PC1View PC1

Page 10: Linux Basic Networking

View PC1 (2)View PC1 (2)

Page 11: Linux Basic Networking

Halt PC1Halt PC1

Page 12: Linux Basic Networking

Restarting NetworkRestarting Network /etc/rc.d/networking restart/etc/rc.d/networking restartoror service network restartservice network restart

Page 13: Linux Basic Networking

Static Routing

Page 14: Linux Basic Networking

network topologynetwork topologyhigh level viewhigh level view

Page 15: Linux Basic Networking

network topologynetwork topologyconfiguration details (2)configuration details (2)

Page 16: Linux Basic Networking

Grouping the NetworkGrouping the NetworkA ­> PC1, r1   NID : 195.11.14.0/24A ­> PC1, r1   NID : 195.11.14.0/24C ­> PC2, r2   NID : 200.1.1.0/24C ­> PC2, r2   NID : 200.1.1.0/24B ­> r1, r2       NID : 100.0.0.8/30B ­> r1, r2       NID : 100.0.0.8/30

Page 17: Linux Basic Networking

The Command is..The Command is..

Page 18: Linux Basic Networking

The Command is..(2)The Command is..(2)

Page 19: Linux Basic Networking

Testing connectivityTesting connectivity

Page 20: Linux Basic Networking

?Testing connectivity(2)Testing connectivity(2)

interfaces on interfaces on differentdifferentdomains cannot bedomains cannot bereachedreachedcan you tell why?can you tell why?

Page 21: Linux Basic Networking

SolutionSolution to fix the problem we could specify the default route on 

thepcs: “through this gateway (ip number) you can reach all theother networks”

Page 22: Linux Basic Networking

Check it.Check it.

Page 23: Linux Basic Networking

Problem! Once again..Problem! Once again..

Page 24: Linux Basic Networking

Solution againSolution again

Page 25: Linux Basic Networking

Final CheckFinal Check

Page 26: Linux Basic Networking

ReferencesReferenceshttp://netkit.org/http://netkit.org/OSC documentation filesOSC documentation files