Pages

2015-05-04

Linux Networking on terminal and Back with CentOS 7

recently i installed centos 7 and happy to say back to play with linux. so as first step after installation was the configure network. first need to check what are the available interfaces in current system. to check that we can use ifconfing -a command

[root@tecmint ~]# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:0B:CD:1C:18:5A
          inet addr:172.16.25.126  Bcast:172.16.25.63  Mask:255.255.255.224
          inet6 addr: fe80::20b:cdff:fe1c:185a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2344927 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2220777 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:293839516 (280.2 MiB)  TX bytes:1043722206 (995.3 MiB)
          Interrupt:185 Memory:f7fe0000-f7ff0000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:5022927 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5022927 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2175739488 (2.0 GiB)  TX bytes:2175739488 (2.0 GiB)

then select the interface you need to active and give following command. mostly with ethernet it will be eth0

ifconfig eth0 up 
or
ifup eth0


[root@tecmint ~]# ifconfig eth0 up
OR
[root@tecmint ~]# ifup eth0

it will try to make connection with dhcp server and request ip and assign that ip to interface
or else we can assign ip to that interface
[root@tecmint ~]# ifconfig eth0 192.168.1.10


0 අදහස්:

Post a Comment

මෙම ලිපිය කියවනකොට හිතුණු දේවල් වලින් ටිකක් මෙතන ලියලම යන්නකෝ