Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-02-2005, 11:19 AM
|
#1
|
|
LQ Newbie
Registered: Feb 2005
Location: Edinburgh, Scotland
Posts: 4
Rep:
|
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
|
|
|
|
02-02-2005, 11:46 AM
|
#2
|
|
Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
u can put that in
/etc/rc.d/init.d/network script
BTW what ifconfg commands do u use???
regards
|
|
|
|
02-02-2005, 12:07 PM
|
#3
|
|
LQ Newbie
Registered: Feb 2005
Location: Edinburgh, Scotland
Posts: 4
Original Poster
Rep:
|
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
|
|
|
|
02-02-2005, 12:44 PM
|
#4
|
|
Member
Registered: Dec 2004
Distribution: RHEL3, FC3
Posts: 53
Rep:
|
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)?
|
|
|
|
02-02-2005, 01:14 PM
|
#5
|
|
Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
Quote:
Originally posted by Duudson
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)?
|
that will be fine i think
u can have alook at some other network scripts to look for more options other than these
regards
|
|
|
|
02-03-2005, 04:21 AM
|
#6
|
|
LQ Newbie
Registered: Feb 2005
Location: Edinburgh, Scotland
Posts: 4
Original Poster
Rep:
|
Quote:
Originally posted by Duudson
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)?
|
(Re: ip numbers - No - they were duds I plugged in - should have clarified that)
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
|
|
|
|
02-03-2005, 06:16 AM
|
#7
|
|
Member
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431
Rep:
|
why is that need of ifconfig everytime? what is your intention?
|
|
|
|
02-04-2005, 03:21 AM
|
#8
|
|
LQ Newbie
Registered: Feb 2005
Location: Edinburgh, Scotland
Posts: 4
Original Poster
Rep:
|
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
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:20 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|