Posts Tagged ‘arp’
Networking Concepts
This post is an extension to the Networking Concepts post we discussed in the past.
You can refer to the post on Networking Concepts by following this link: http://abcofaix.wordpress.com/2012/03/11/networking-concepts-ip/
Let us revise some of the concepts we learnt in the past.
Command to check Ethernet adapters’ availability is:
# lsdev –Cc adapter
# lsdev –Cc if
Where If stands for the Interface.
This command will check how many interfaces are available.
Each adapter will have 2 interfaces.
For eg:
Ent0 adapter will have 2 interfaces:
1. En0
2. Et0
En0 is a standard Ethernet interface used in assigning ip addresses.
Et0 is used basically in IEEE as Ethernet interface.
Ip is never assigned directly to the adapter.
To assign an ip, command used is:
# ifconfig en0 <ip address> <network address>
To check current ip address, command used is:
# ifconfig –a
254 ip addresses can be assigned to a single interface.
Eg to assign an ip to an interface is:
# ifconfig en0 192.168.0.1 255.255.255.0
i.e.
# ifconfig en0 <ip address> <subnet mask>
When do we use ‘ALIAS’?
Consider the following command:
# ifconfig en0 <ip address> <subnet mask> alias
What is the function of ‘alias’ here?
Alias is basically used to assign more than 1 ip address to a single interface.
For eg:
# ifconfig en0 192.168.0.2 255.255.255.0 alias
This command will assign 2 ip addresses to a single interface en0.
If no ‘alias’ is used:
# ifconfig en0 192.168.0.2 255.255.255.0
This command will replace the earlier ip address for the interface en0 with a new ip address.
So, by using ‘alias’, we can assign 255 ip addresses to a single interface.
Command to delete an ip address from an interface:
# ifconfig en0 192.168.0.2 255.255.255.0 delete
This command will delete this particular ip address from en0 interface.
# ifconfig en0 down
This command will turn off network interface en0.
To permanently add an ip address to en0 or en1 interface, command used is:
# chdev –EH –l en0 –a netaddr = <ip address> -a <subnet mask>
For eg:
# chdev –EH –l en0 –a netaddr = 192.168.0.1 –a 255.255.255.0
To permanently add alias to the interface, command used is:
# chdev –EH –l en0 –a alias = <ip address> -a <subnet mask>
For eg:
# chdev –EH –l en0 –a alias = 192.168.0.2 –a 255.255.255.0
To permanently remove added alias from the interface, command used is:
# chdev –EH –l en0 –a delalias = <ip address> -a <subnet mask>
For eg:
# chdev –EH –l en0 –a delalias = 192.168.0.2 –a 255.255.255.0
To remove all tcp / ip configuration from host, command used is:
# rmtcpip
One can see ent0 statistics by running the following command:
# netstat –v ent0 | more
To add gateway:
A gateway is basically added to connect intranet to internet i.e. to connect your home/private network to the internet.
To add a gateway, command used is:
# route add –net <destination network ip address> <default gateway>
To check gateway, command used is:
# netstat –r
To delete a gateway, command used is:
# route delete <destionation network ip address> <default gateway>
To add / make STATIC gateway:
Edit the file /etc/rc.net by running the following command:
# vi /etc/rc.net
Add the following line:
# route add –net <ip address> <subnet mask> -a <gateway>
# route
Command will make manual entries in routing table till the next reboot.
To check the routing table which has gateway information, command used is:
# netstat –rn
To check MAC address of a particular Ethernet interface, command used is:
# entstat en0
Or
# netstat –i
This command will check incoming/outgoing network packet errors.
Ip packets can be captured using iptrace or tcpdump or netstat –in command.
To listen / capture packets from a specific device, command used is:
# tcpdump –I en0 –n <filename where information will be stored> <destination ip address>
Only the root user can run this command.
Arp stands for address resolution protocol.
arp command displays and modifies address resolution.
# arp –a
Command will display local arp cache.
Nslookup command always query internet domain name servers.
Tracert (traceroute) command displays route that ip packets takes to network hosts. For eg:
# tracert google.com
This will be all for this post. I’ll keep updating this blog as and when needed.
P.S: everything written on this blog is written after thorough study of various red hat pdf’s and online material available, mixed with writer’s experience and understanding of the subject. I do not hold any copyrights to the content published here. Anybody can make use of this content. A word of appreciation is enough for me to keep moving.
Till then,
Happy Learning!
Regards
RA
User Administration Continued…
To create a new user as an admin, command used is:
# mkuser –a U1
To create a new user and set su attributes to false, command used is:
# mkuser su = false U1
Same can be achieved using SMIT commands as well.
For eg:
# smit mkuser
User’s password can be changed using SMIT:
# smit passwd
To remove a user from the system:
# rmuser –p U1
This will remove complete information about user U1. To delete user’s home directory:
# rmdir –r /home/U1
User deletion can also be done using SMIT:
# smit rmuser
Chuser command is used to change the attributes of the user.
For eg:
If admin wants to change login attributes of U1:
# chuser login = false U1
This will lock the user account to login.
To change the groups of the users:
# chuser groups = staff, sales U1
To create multiple directories within a directory in one go (using one command):
# mkdir –p file1/{f1,f2,f3,f4}
This will create a new directory file1 and simultaneously create 4 new directories f1, f2, f3, f4 inside file1.
To create directories inside directories through one command:
# mkdir –pv f1/f2/f3/f4
This command will create subfolders inside each folder.
History command will show the history of the commands run for that particular user’s logged in session.
# !! command will execute the last/previous command executed.
To change the owner of a file or a directory:
# chown <new username> <foldername>
For eg:
# chown U1 /f1
This command will change the ownership to U1 for folder f1.
Domain user accounts reside in AD (Active Directory).
Local user accounts reside on each computer locally.
Ftp stands for file transmission protocol
Arp stands for address resolution protocol
Telnet command is used for accessing remote computers.
Talk command is used to carry conversation between 2 users connected in a network.

