Add new ethernet in linux
1. check whether it already detect in kernel or not using dmesg
as we can see, we find ethernet call vmcnet/pci
2. give alias in /etc/modprobe.conf
as i have already new ethernet before. so i just add new one below the previous one. since newer ethenet is same with before, so the driver possibly same too
3. next step is probe the driver
if something goes well there will no error message
4. after that, try check using ifconfig
perfect, eth1 is installed in my linux box :-)
5. now, i'd like to give it ip. to make permanently, i will create new file in /etc/sysconfig/network-scripts/ifcfg-eth1
or, if you got little busy, you can use setup menu
# setup
on setup menu, choose network configuration
after that, choose eth1
6. after finish setup, restart your network
/etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth1: [ OK ]
finish
#dmesg | grep net
audit: initializing netlink socket (disabled)
SELinux: Registering netfilter hooks
Initializing IPsec netlink socket
VMware vmxnet virtual NIC driver
Found vmxnet/PCI at 0x2024, irq 59.
SELinux: Unregistering netfilter hooks
pcnet32.c:v1.32 18.Mar.2006 tsbogend@alpha.franken.de
process `sysctl' is using deprecated sysctl (syscall) net.ipv6.neigh.lo.base_reachable_time; Use net.ipv6.neigh.lo.base_reachable_time_ms instead.
Found vmxnet/PCI at 0x20a4, irq 75.
as we can see, we find ethernet call vmcnet/pci
2. give alias in /etc/modprobe.conf
#vi /etc/modprobe.conf
alias eth0 vmnics
alias eth1 vmnics
as i have already new ethernet before. so i just add new one below the previous one. since newer ethenet is same with before, so the driver possibly same too
3. next step is probe the driver
# modprobe eth1
if something goes well there will no error message
4. after that, try check using ifconfig
# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:50:56:97:5A:3F
inet6 addr: 2001:e00:e:27:250:56ff:fe97:5a3f/64 Scope:Global
inet6 addr: fe80::250:56ff:fe97:5a3f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:383 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25774 (25.1 KiB) TX bytes:6249 (6.1 KiB)
Interrupt:67 Base address:0x20a4
perfect, eth1 is installed in my linux box :-)
5. now, i'd like to give it ip. to make permanently, i will create new file in /etc/sysconfig/network-scripts/ifcfg-eth1
or, if you got little busy, you can use setup menu
# setup
on setup menu, choose network configuration
after that, choose eth1
6. after finish setup, restart your network
/etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth1: [ OK ]
finish
Komentar