Find the answer to your Linux question:
Results 1 to 4 of 4
how to add a virtual address to* /etc/config/network file: I did use vi /etc/config/network and then added them Manually as it shown below but still not working Code: config 'alias' ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2013
    Posts
    2

    DNS Resolver


    how to add a virtual address to* /etc/config/network file: I did use vi /etc/config/network and then added them Manually as it shown below but still not working
    Code:
    config 'alias'
    option 'interface' 'lan'
    option 'proto' 'static'
    option 'netmask' '255.255.255.0'
    option 'ipaddr' 10.4.0.2
    in addition to I would like to add this two ip address below to the startup line in the /etc/init.d/dnsmasq script:
    Code:
    /usr/sbin/dnsmasq --listen-address=127.0.0.1 --listen-address=10.4.0.1 $args && {
    I used vi /etc/init.d/dnsmasq, but, I didn't know where and under which line exactly. I also want to add option nonwildcard 1 to the dnsmasq section of* /etc/config/dhcp file:
    would someone help please your help will greatly be appreciate smile smile
    thanks
    Last edited by atreyu; 03-06-2013 at 07:40 PM. Reason: added CODE tags to aid readability

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Hello and welcome!

    Can you please provide your specific Linux distro and version?

  3. #3
    Just Joined!
    Join Date
    Mar 2013
    Posts
    2
    thanks atreyu my distro is Ubuntu 12.10

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by silvakair View Post
    how to add a virtual address to* /etc/config/network file: I did use vi /etc/config/network and then added them Manually as it shown below but still not working
    Code:
    config 'alias'
    option 'interface' 'lan'
    option 'proto' 'static'
    option 'netmask' '255.255.255.0'
    option 'ipaddr' 10.4.0.2
    that doesn't look right to me. at least for what goes in /etc/config/network. try this:

    Code:
    auto eth0:0
    iface eth0:0 inet static
    name Ethernet alias LAN card
    address 10.4.0.2
    netmask 255.255.255.0
    broadcast 10.4.0.255
    network 10.4.0.0
    u probably dont need the bdcast/network lines at the end. once u have saved it, restart networking:

    Code:
    sudo /etc/init.d/networking restart
    then run ifconfig and see if you see the alias.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •