element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
BeagleBoard
  • Products
  • Dev Tools
  • Single-Board Computers
  • BeagleBoard
  • More
  • Cancel
BeagleBoard
Forum Changing Static Ip adderess.
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join BeagleBoard to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 14 replies
  • Answers 4 answers
  • Subscribers 103 subscribers
  • Views 3513 views
  • Users 0 members are here
Related

Changing Static Ip adderess.

daniel689
daniel689 over 6 years ago

I am trying to change the IP address of my Beagle.   My google attemps have lead me to modifying the interfaces file using a nano editor.   

 

 

 

I have edited the file to

 

# The primary network interface

auto eth0

iface eth0 inet static

address 192.168.1.80

netmask 255.255.255.0

gateway 192.168.1.1

…

# Ethernet/RNDIS gadget (g_ether)

iface usb0 inet static

address 192.168.7.4

netmask 255.255.255.0

network 192.168.7.0

gateway 192.168.7.1

 

 

I was expecting it to change when saved but it is clearly not.   It still says 192.168.7.2.

 

 

 

I was ex

  • Sign in to reply
  • Cancel

Top Replies

  • mp2100
    mp2100 over 6 years ago +1 suggested
    Daniel, do you want to change both the USB address and the Ethernet address? Normally I leave the USB at the default (192.168.7.2). For the Ethernet (your example is 192.168.1.80) you can try a reboot…
  • shabaz
    shabaz over 6 years ago +1 suggested
    Hi Daniel, I don't know the answer, but I'm guessing it is because that's a special interface, it may restrict itself to only certain addresses (despite being configured as a /24 network in the file you…
  • shabaz
    shabaz over 6 years ago in reply to clem57 +1 suggested
    Hi Clem, I'm not sure this will work. There's an earlier link pasted above, that suggest connman is not used for USB network configuration. Text from there: OK, figured it out. The usb0 interface is not…
Parents
  • clem57
    0 clem57 over 6 years ago

    Very important! Are you using Angstrom on the BBB? If so, it uses Connman which is script driven. Do this to find out:

    uname  -a

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 6 years ago in reply to clem57

    Those script rewrite the files you are trying to change.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • daniel689
    0 daniel689 over 6 years ago in reply to clem57

    Really.   Where is the file that I need to change to make the IP address changeable. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 6 years ago in reply to daniel689

    First need to find your ethernet settings:

     

    root@beaglebone:/var/lib/connman# ls -al

    total 16

    drwxr-xr-x 3 root root 4096 Jan 1 2000 .

    drwxr-xr-x 18 root root 4096 Jan 1 2000 ..

    drwx------ 2 root root 4096 Jan 1 2000 ethernet_c8a030ab323a_cable

    -rw------- 1 root root 68 Jan 1 2000 settings

    root@beaglebone:/var/lib/connman# cd ethernet_c8a030ab323a_cable/

    root@beaglebone:/var/lib/connman/ethernet_c8a030ab323a_cable# ls

    data settings settings.ODU2WW

    root@beaglebone:/var/lib/connman/ethernet_c8a030ab323a_cable# more settings

    [ethernet_c8a030ab323a_cable]

    Name=Wired

    AutoConnect=true

    Modified=2000-01-01T01:18:21.869401Z

    IPv4.method=dhcp

    IPv4.DHCP.LastAddress=192.168.1.100

    IPv6.method=auto

    IPv6.privacy=disabled

    So in my case my name is ethernet_c8a030ab323a_cable.

     

    Look for /usr/lib/connman/test.

    • In there you can use the script to set the Ethernet static IP using my name from above:

    ./set-ipv4-method ethernet_c8a030ab323a_cable manual 192.168.1.80 255.255.255.0 192.168.1.1

     

    That should be saved in the connman file above.

     

    Hope this helps,

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • shabaz
    0 shabaz over 6 years ago in reply to clem57

    Hi Clem,

     

    I'm not sure this will work. There's an earlier link pasted above, that suggest connman is not used for USB network configuration.

    Text from there:

    OK, figured it out.  The usb0 interface is not configured using connman like eth0 is.  It's configured using udev.

     

    This is why I think it's going to by different, or not as straightforward to change it. But also begs the question, why change it, given that for most practical scenarios, it is only used during initial setup. It may need changing if multiple BBBs are being connected to the same PC via USB, I don't know, but that's a not-normal scenario so it would be good to know the reason to want to change the IP addressing.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • shabaz
    0 shabaz over 6 years ago in reply to clem57

    Hi Clem,

     

    I'm not sure this will work. There's an earlier link pasted above, that suggest connman is not used for USB network configuration.

    Text from there:

    OK, figured it out.  The usb0 interface is not configured using connman like eth0 is.  It's configured using udev.

     

    This is why I think it's going to by different, or not as straightforward to change it. But also begs the question, why change it, given that for most practical scenarios, it is only used during initial setup. It may need changing if multiple BBBs are being connected to the same PC via USB, I don't know, but that's a not-normal scenario so it would be good to know the reason to want to change the IP addressing.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • daniel689
    0 daniel689 over 6 years ago in reply to shabaz

    The reason why is a need multiple BBB units in the same network.   They all cann't have the same Ip address.


    Regards

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 6 years ago in reply to daniel689

    Hi Daniel,

     

    I understand that - my question is, why are there multiple BBBs hanging off USB, for you to need to change the IP addresses? If they are connected to the network via Ethernet, the problem goes away, due to DHCP.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube