Вы находитесь на странице: 1из 7

BASICS OF NETWORKING Networking Basics

What is CLASS A,B,C,D in networking? What is VLAN ? Communicating between VLANs What is a routing table? What is NULL Route ? IP/NETWORK Configuration files What is the Procedure to change Ip and default gateway in LINUX ? What is ICMP ? What is ARP ? what is nslookup ?

What is CLASS A,B,C,D in networking ? IP addresses were originally organized into classes. The class determined the potential size of the network. based on the number of host and network part the ip is divided into five types

Class A

1.0.0.1 to 126.255.255.254

Supports 16 million hosts on each of 127 networks.

Class B

128.1.0.1 to 191.255.255.254

Supports 65,000 hosts on each of 16,000 networks.

Class C

192.0.1.1 to 223.255.254.254

Supports 254 hosts on each of 2 million networks.

Class D

224.0.0.0 to 239.255.255.255

Reserved for multicast groups.

Class E

240.0.0.0 to 254.255.255.254

Reserved.

only A, B and C are commonly used. Generally All IP addresses are broken down into 4 sets of octets that break down into binary to represent the actual IP address. The below chart is a basic example of the basic IP 255.255.255.255.

IP:

255.

255.

255.

255.

Binary value:

11111111. 8

11111111. 8

11111111. 8

11111111. 8

Octet value:

Network Classes: Class A: Defined by the first 8 bits with a range of 0 - 127. First number (8 bits) is defined by Internic i.e. 77.XXX.XXX.XXX One class A network can define 16,777,214 hosts. Range: 0.0.0.0 - 127.255.255.255 Class B: Defined by the first 8 bits with a range from 128 - 191 First two numbers (16 bits) are defined by Internic i.e. 182.56.XXX.XXX One class B network can define 65,534 hosts. Range: 128.0.0.0 - 191.255.255.255 Class C: Defined by the first 8 bits with a range from 192 - 223 First three numbers (24 bits) are defined by Internic i.e. 220.56.222.XXX One class B network can define 254 hosts. Range: 192.0.0.0 - 223.255.255.255 Class D: Defined by the first 8 bits with a range from 224 - 239 This is reserved for multicast networks (RFC988) Range: 224.0.0.0 - 239.255.255.255 Class E: Defined by the first 8 bits with a range from 240 - 255 This is reserved for experimental use. Range: 240.0.0.0 247.255.255.255

Useful links Subnet Masking and Addressing - CISCO Subnet Calculator Subnet Cheat Sheet Network Calculator

What is VLAN ? A VLAN is a partitioning of a network into multiple subnets using a VLAN ID. The partitioned network can be on a single router, can be on multiple routers that would otherwise form a single network, or can be on a VPN A virtual LAN, commonly known as a VLAN, is a group of hosts with a common set of requirements that communicate as if they were attached to the same wire, regardless of their physical location. A VLAN has the same attributes as a physical LAN, but it allows for end stations to be grouped together even if they are not located on the same LAN segment. Network reconfiguration can be done through software instead of physically relocating devices. Communicating between VLANs Cisco IOS provides full-feature routing at Layer 3 and translation at Layer 2 between VLANs. There are three different protocols available for routing between VLANs: Inter-Switch Link (ISL) IEEE 802.10 ATM LAN Emulation

What is Routing Table ? A routing table is a database in which a routing protocol stores information about the network layer topology of the intranetwork. What is static Route ? Internet Protocol uses a routing table to determine where packets should be sent. First the packet is examined to see if its' destination is for the local or remote network. If it is to be sent to a remote network, the routing table is consulted to determine the path. If there is no information in the routing table then the packet is sent to the default gateway. Static routes are set with the route command and with the configuration file Command to check the routes in a host netstat -nr commands to add routes following command add the 172.16.12/24 network packets to be routed to 192.9.203.1 gateway ip route add -net 172.16.12.0 netmask 255.255.255.0 gw 192.9.203.1 eth0

To delete a route route delete -net 172.16.12.0 gw 192.9.203.1 eth0 Gateway can also be defined in /etc/sysconfig/network in case of Redhat for UNIX /etc/inet/config command to add default gayteway route add default 0.0.0.0 netmask 0.0.0.0 gw 192.9.205.1 or route add default 192.9.205.1

WHAT is NULL Route ? A null route is a route that goes to nowhere. The reason for creating a null route is to prevent your system from sending any data to a remote system. route add 192.9.203.20.0 0.0.0.0

IP/Network Configuration Files: /etc/resolv.conf - host name resolver configuration /etc/hosts - locally resolve node names to IP addresses /etc/nsswitch.conf - System Databases and Name Service Switch configuration /etc/inet/config To change the static route in unix /etc/sysconfig/network (Red Hat)configuration file used by the system during the boot

Procedure to change IP in unix Command to change ip address for interface eth0 /sbin/ifconfig eth0 172.16.12.9 netmask 255.255.255.0 broadcast 172.16.12.255

IP Configuration Files: /etc/sysconfig/network For configuring static IP use this file with following settings NETWORKING=yes HOSTNAME=my-hostname FORWARD_IPV4=true GATEWAY="XXX.XXX.XXX.YYY" For DHCP configuration use the following settings NETWORKING=yes HOSTNAME=my-hostname For the changes to take effect immediately use this command to restart the network service service network restart (or: /etc/init.d/network restart)

ICMP: (IN LINUX) ICMP is the network protocol used by the ping and traceroute commands. ICMP redirect packets are sent from the router to the host to inform the host of a better route Blocking ICMP and look invisible to ping: The following firewall rules will drop ICMP requests. IPTABLE > iptables -A -output -p icmp -d 0/0 -j DROP IPCHAIN > ipchains -A output -p icmp -d 0/0 -j DENY use this command to block all the ping request to this server > /proc/sys/net/ipv4/icmp_echo_ignore_all

ARP: Adress Resolution Protocol Ethernet hosts use the Address Resolution Protocol (ARP) to convert a 32-bit internet IP addresses into a 48-bit Ethernet MAC address used by network hardware. ARP broadcasts are sent to all hosts on the subnet by the data transmitting host. The broadcast is ignored by all except the intended receiver which recognizes the IP address as its own. This command lists the arp table of the host arp -a

What is nslookup ? nslookup <machine name> Query name server to map names (e.g. burro.baylor.edu) to IP address and IP addresses to names (the reverse). Optionally, you can specify the name server you want to use. Under UNIX, the default name server for a machine can be found in the /etc/resolv.conf file. nsllokup yahoo.com traceroute - Print the route packets take to network host Tracing route to yahoo.com [216.109.112.135] over a maximum of 30 hops: 1 <1 ms <1 ms <1 ms 10.0.0.1 2 3 ms 2 ms 1 ms 192.168.1.1 3 15 ms 15 ms 14 ms ABTS-TN-dynamic-001.48.164.122.airtelbroadband.i n [122.164.48.1] 4 18 ms 18 ms 15 ms 61.246.253.225 5 14 ms 13 ms 15 ms 61.95.240.129 6 14 ms 15 ms 15 ms 203.101.100.226 7 247 ms 242 ms 249 ms sl-gw39-nyc-10-2.sprintlink.net [144.223.157.149 ] 8 239 ms 239 ms 239 ms sl-bb21-nyc-3-0-0.sprintlink.net [144.232.13.57]

9 247 ms 250 ms 249 ms sl-bb22-nyc-14-0.sprintlink.net [144.232.7.102] 10 248 ms 248 ms 249 ms sl-bb26-nyc-11-0.sprintlink.net [144.232.7.41] 11 271 ms 272 ms 269 ms 144.232.8.194 12 278 ms 279 ms 275 ms tbr1.n54ny.ip.att.net [12.122.81.10] 13 278 ms 278 ms 275 ms cr2.n54ny.ip.att.net [12.122.16.133] 14 276 ms 277 ms 277 ms cr2.wswdc.ip.att.net [12.122.3.38] 15 275 ms 274 ms 275 ms tbr2.wswdc.ip.att.net [12.122.16.126] 16 275 ms 277 ms 273 ms 12.122.113.77 17 273 ms 271 ms 269 ms 12.86.111.22 18 274 ms 275 ms 275 ms ge-0-0-0-p120.msr1.dcn.yahoo.com [216.115.108.9] 19 274 ms 274 ms 271 ms ge2-2.bas1-m.dcn.yahoo.com [216.109.120.142] 20 271 ms 274 ms 271 ms w2.rc.vip.dcn.yahoo.com [216.109.112.135] Trace complete.

Вам также может понравиться