ifconfig on Network start/restart
I am running fedora Core 3 and have several ifconfig commands I am currently entering manually.
What would be the "correct" way to script/install these commands to run automatically any time the Network service starts/restarts? Chris |
u can put that in
/etc/rc.d/init.d/network script BTW what ifconfg commands do u use??? regards |
I was unsure about entering the details into this script, I will read some documentation if I can find it.
What I am doing is creating a list of interfaces like this: ifconfig eth1:1 266.123.54.996 netmask 255.255.255.240 up ifconfig eth1:2 266.123.54.997 netmask 255.255.255.240 up ifconfig eth1:3 266.123.54.998 netmask 255.255.255.240 up to create virtual interfaces. Should I be doing this in some other way? Chris |
Create files e.g. /etc/sysconfig/network-scripts/ifcfg-eth1:1 with content
IPADDR=10.1.1.1 NETMASK=255.255.255.0 ONBOOT=yes Then give command service network restart btw, I hope you are not using those addresses (266.123.54.996)? |
Quote:
that will be fine i think u can have alook at some other network scripts to look for more options other than these regards |
Quote:
This is exactly the solution I tried unsuccessfully before posting - I wll go away and check I had done it correctly! I could not quickly figure out where the devices list was derived from used in the networking scripts, it did not seem to pick up these files in the network-scripts directory. I had given them rw- r-- r-- permissions which were the same as the ifcfg-eth0 and ifcfg-eth1 files had. Many thanks for your responses. Chris |
why is that need of ifconfig everytime? what is your intention?
|
Hello,
My intention was to create virtual interfaces for records in DNS when the machine only actually has 2 network devices. Am I overlooking something simple! Chris |
All times are GMT -5. The time now is 12:03 AM. |