2

I am trying to build a network bridge for my VMs on a server.

So I added a new file and changed another in the /etc/sysconfig/network-scripts directory.

Then I did a network reboot with the following command:/etc/init.d/network restart

After that the server was not up again. I contacted the hosting provider's support for help.

I need a way to verify my new configuration before a network restart. I need to make sure that it will be up again, just like apache's /etc/init.d/httpd configtest

1
  • Don't use NetworkManager, if it's enabled on your system.
    – ewwhite
    Oct 26, 2012 at 10:03

2 Answers 2

1

In essence you will need to create a script in your language / shell of choice to interrogate your server for currently loaded networking information, compare it to any changes made to the interfaces, routing tables, config files, and any other receptacle of networking options, and then run logic on the differences to determine if conditions exist that break access to any or all networks.

Since each networked device has a plethora of different interfaces, routes, protocols, physical and virtual infrastructure that are unique to your scenario, it's not exactly as easy to create a configtest as it is with Apache. (I use the word "easy" in relation to Apache with my filiform papillae stifly impressed against my buccal region)

In short, you'll be looking at creating a script on your own that checks for the conditions that you are most concerned with. And if you were intimately familiar enough with the networking resources on your servers to be able to make that kind of script, you'd probably not need that kind of script. Okay, that's not exactly true, but it sounded good.

TL;DR

How are good are you with perl?

2
  • how about ruby?
    – wael34218
    Nov 25, 2012 at 10:04
  • @wael34218 Whatever works.
    – Wesley
    Nov 26, 2012 at 15:56
1

I think there is no solution for that. Apache just test the syntax of the config file only. You can also create a script for testing the syntax of the files in /etc/sysconfig/network-scripts But the problem is there are many problem with this :

  • Wrong IP Address ( or Duplicated Ip Address ) make your machine unreachable
  • Routing Table : I myself got this problem too, when restart network, the server lost routing table and I can not reach the server until I use another server from same network to access to this server to add static route.
  • ...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .